3 # Reset a SVN working copy to its original state
5 # Luiz Fernando N. Capitulino
6 # <lcapitulino@gmail.com>
12 echo "usage: $(basename $0) [ -n ]"
20 if [ "$1" = "-h" -o "$1" = "--help" ]; then
25 svn revert
-R .
1> /dev
/null ||
exit 1
27 # we can't remove in the background because we may download
28 # the same file with 'svn up'
29 svn st |
egrep '^\?' |
xargs rm -rf
30 find .
-iname '*~' |
xargs rm -f
32 if [ -z "$NO_SVN" ]; then
33 svn up
1> /dev
/null ||
exit 1