svn: how to clean up my repository directory?

I have a local svn repository. I work in the repository, e.g. compiling latex documents and building software packages, and there are many useless temporary files there. How can I clean it up by automatically clean these temporary files like the git clean -f in git?

asked Feb 1, 2013 by anonymous

1 Answer

 
Best answer

svn seems has no built-in function for this. But you can remove untracked files like this:

svn st | grep '^?' | awk '{print $2}' | xargs -I{} rm -rf '{}'

In the svn st command's results, the untracked files are marked with ? at the beginning of the lines of outputs.

answered Feb 1, 2013 by anonymous
selected Feb 1, 2013 by SA

Please log in or register to answer this question.

Copyright © SysTutorials. User contributions licensed under cc-wiki with attribution required.
Hosted on Dreamhost

...