I\'m trying to find a command (can be bash command) to revert a group of svn files.
Let\'s say I have some changes in my check-out and I run svn st
and get
The way I finally did it is by creating this command:
svn st | grep SomeFolderA | awk {'print $2'} | xargs svn revert
Explanation:
svn st
- Finds all the modified filegrep SomeFolderA
- Filters the svn output to only show lines that have SomeFolderA
awk {'print $2'}
- removes the M
at the beginning of each output linexargs svn revert
- The xargs
command uses the output from previous command and passes it, as is, to the svn revert
command