Subversion Tips & Tricks

Ignore .pyc files in Subversion

Create a file (.svnignore) with the regular expressions

h .svnignore

*.pyc
*~

Run svn propset on the project

 svn -R propset svn:ignore -F .svnignore .
  • -R indicates that you are doing this recursively so all the directories ignore these.
  • -F indicates the file we just created with the regular expressions.

If you’ve already got yourself into the mess of versioning your compiled files, then you might want to do a few things.

  • Revert all the .pyc files (you can always recompile them). You don’t want there to be any local changes when you try to delete them:
 find -name "*.pyc" -exec svn revert {} \;
  • Delete all the .pyc files using `svn delete`:
 find -name "*.pyc" -exec svn delete {} \;
  • Finally recompile and re-run the svn ignore code above

Adding external SVN repo into yours

mkdir external
svn pe svn:externals external

add local and remote dir (as for example)

 django  http://code.djangoproject.com/svn/django/trunk/django
svn.txt · Last modified: 2009/05/25 00:35 (external edit)
CC Attribution-Noncommercial-Share Alike 4.0 International
Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0 ipv6 ready