svn cleanup (parrot)

rurban on 2009-01-03T16:04:06

From time to time I want a clean svn repo again, esp. for parrot.

Something like a make distclean if that would work in parrot.

I could delete all files which are not in MANIFEST, but easier is this simple svn hack, svn-cleanup:

#!/bin/sh # remove unknown files svn status|perl -ane'print "$F[1]\n" if /^\?/' |\ xargs rm # AND revert modified files. take care!!! for f in $(svn status | \ perl -ane 'print "$F[1]\n" if /^\M/') do svn revert $f done

This deletes all files not in the repo and reverts all my private modifications.


make svnclobber

Bernhard on 2009-01-03T21:43:57

Doesn't 'make svnclobber' and 'svn revert -R .' achieve the same goal?

Wow. Just use git-svn instead

Aristotle on 2009-01-04T06:45:46

cd $root_of_working_copy
rm -r .!(@(|.|git)) *
git reset --hard

Re:Wow. Just use git-svn instead

Aristotle on 2009-01-04T06:47:42

(This does assume bash with the extglob option set and failglob unset, btw; the latter is the default, the former I think is not.)

Re:Wow. Just use git-svn instead

rurban on 2009-01-04T12:43:33

Thanks for the tip, but cloning the parrot repo with git svn did last about 24 hours. I wouldn't recommend that.

Re:Wow. Just use git-svn instead

Aristotle on 2009-01-04T14:04:48

Ouch. Yeah, the Subversion protocol is very chatty and not designed with the idea in mind that someone would want to retrieve every single revision. I wonder what happened to the git-svnserver effort…