[nzlug] svn - importing in-place

Robert Coup robert.coup at onetrackmind.co.nz
Mon Jun 18 13:00:02 NZST 2007


Jim Cheetham wrote:
> I have a tree of data that is un-reconstructable (i.e. it doesn't have
> a make process), but I want to track changes to it with svn. The main
> problem is that I want to preserve metadata - file permissions.
>
> I can import it all in to a repository, but in order to have a
> "working copy" I have to check it all out again somewhere else. The
> check out recreates all the files, but doesn't preserve permissions.
>
> Under normal circumstances I'll never be checking these files out -
> only tracking changes to them.
>
> Does anyone have any svn tricks that will allow me to import and
> create a working copy in-place?
It's not "in-place", but it should work:

1. Import the original data
2. Checkout - this will create all the .svn dirs & get all the files 
from the repository.
3. Copy everything from your original over the top of your checkout, 
preserving permissions.

A "svn status" shouldn't pick up any changes, because the file contents 
are the same. SVN does know about +x, but that should be recorded 
correctly at import time.

Rob :)




More information about the NZLUG mailing list