views:

278

answers:

4

Is there any way with subversion or any other VCS that i can keep the checked out files in the .svn directory in a different place then the directory where they "belong". For example having some toplevel /work/my-source-tree and a /work/my-source-tree-svn directory?

I know why the files are duplicated in .svn directories (fast detection of changed files at checkin and easy tool support). But i often want to do a backup of the files for example on an USB stick and transfering the double number of files is a showstopper.

+6  A: 

Use svn export to copy the files to a clean directory (ie, your USB stick). It will not copy the .svn directories. This also works for working copies:

svn export <path-to-working-copy> <destination-directory>
Ferdinand Beyer
+7  A: 

With CVS, SVN and other version control systems, you can do an export. This allows you to get a copy of the code without the .svn or other hidden directories.

SVN Export documentation

BrianV
Well but what if want to take my project files to home to finish something before i check in?Sorry export is not the answer i wanted to hear.
Lothar
In that case, svk is likely what you want :p
BrianV
+3  A: 

You could backup to your USB stick using rsync, and use the --cvs-exclude option. Depending on your version, this may not work for subversion files, so try --exclude='.svn/*'

Paul Dixon
+3  A: 

svk is a layer on top of subversion that adds a few additional features. One key feature is that metadata is kept in $HOME/.svk/ instead of within each working copy. This separates the two and would make your backups easier and working copies smaller.

Plus, it also provides some distributed version control features, like git and others - but still using svn as the backend. Might be worth a try.

jmanning2k