Reputation: 942
When reverting files that have been modified locally, is there a way to exclude files? Due to circumstances beyond my control, my current workflow is to:
What I'm after would look something like
svn revert -R --exclude file1 --exclude file2 /my/path
Upvotes: 3
Views: 4667
Reputation: 5196
Using changelists.
Tag all files as to_revert
:
$ svn changelist to_revert -R /my/path
Untag some files:
$ svn changelist --remove file1 file2
Revert only tagged files:
$ svn revert --changelist to_revert -R /my/path
Upvotes: 4
Reputation: 5196
Use find
to do the matching.
find . -name .svn -prune -o -name file1 -o -name file2 -o -print0 |
xargs -0 svn revert --
-name file1
excludes by file name in any subdirectory,-path ./src/file1
excludes by specific path,-path ./src/dir1 -prune
excludes an entire directory.Upvotes: 0