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-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 ipv6 ready