Personal tools
You are here: Home Docs Subversion

Subversion

SVN Cleanup (New School)

Sometimes you want to check out a project from one repository and check it into another.  Before you do that you'll need to remove all the .svn directories so that the import will be successful.
find . -name '.svn' -print0 | xargs -0 rm -rfv

If it's a python project, you probably also want to remove the .pyc files

find . -name '*.pyc' -print0 | xargs -0 rm -rfv

SVN Undo

$ svn merge -c -303 http://svn.example.com/repos/calc/trunk
U integer.c

$ svn status
M integer.c

$ svn diff
…
# verify that the change is removed
…

$ svn commit -m "Undoing change committed in r303."

SVN Ignore for buildout-based python projects

# svn propset svn:ignore --file svn_ignore.txt . --recursive
*.pyc
*.py~
.DS_Store
svn_ignore.txt
*.egg-info
develop-eggs
bin
parts
fake-eggs
.installed.cfg

SVN Ignore svn:externals

svn co http://svn.zentraal.com/path/to/project --ignore-externals

Check out a specific revision

svn co http://svn.zentraal.com/path/to/project@7777
Document Actions