0

Is there a way to test the results of the svn:ignore property without doing a commit first?

I have a large svn project that I reorganized locally using git. Now I need to apply the svn:ignore property to match the .gitignore file. I'd like to test that all my changes to the svn:ignore property work properly before I do a commit. Is there a way to do this?

I know could work on a branch until I get it right and then merge, but it seems there should be an easier way.

  • Use `svn status`, see http://stackoverflow.com/questions/86049/how-do-i-ignore-files-in-subversion – The Nail Aug 28 '13 at 19:16
  • `svn status` does not look at local changes to properties (that I am aware of). I would have to commit, which is what I was trying to avoid. – Byron Holldorf Aug 28 '13 at 19:29

1 Answers1

1

You can test your svn:ignore before you commit your change with the svn:ignore property. Create files and/or directories to be ignored. Don't do a svn add. Just add the files to your working directory.

Then, do a svn ignore. Those files added to your working directory should not show up. (REMEMBER: Don't do svn add for these files!). After that, you can do a svn status --no-ignore and the files being ignored should show up with a status of I.

I find it easier to set your VISUAL environment variable, and then use svn pe svn:ignore since each ignored file specification should be on its own line.

Remember, if a file is already in your repository, it cannot be ignored.

David W.
  • 105,218
  • 39
  • 216
  • 337
  • Some of the differences between what works with .gitignore and svn:ignore were tripping me up and made it appear as though it wasn't working, but the `--no-ignore` option got me back on the right track. – Byron Holldorf Aug 28 '13 at 20:57