Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Synchronize a SVN repository and later make it independent (copy a repository)

I am synchronizing an SVN repository between two systems using svnsync and I am not 100% sure if its possible to make it independent for my "new users" after the sync is finished.

What do I need to do to make it a completely independent entity? Is it enough just to change the passwd file?

like image 613
siliconpi Avatar asked Jan 20 '11 06:01

siliconpi


People also ask

How do I sync SVN?

The svnsync synchronize command does all the heavy lifting of a repository mirroring operation. After consulting with the mirror repository to see which revisions have already been copied into it, it then begins to copy any not-yet-mirrored revisions from the source repository.

Can I use Git and SVN at the same time?

You can clone a subversion repository to your machine using git svn clone <SVN repo URL> . The code will be available as a git repository. You can do your work there and make local commits as you please. There is a command line option to get a "shallow" checkout rather than the entire repository which is often useful.


1 Answers

What do I need to do to make it a completely independent entity?

The only link between the new repository and the original are a number of revision properties that are used by svnsync synchronize. You can safely remove those like this:

svn propdel --revprop -r 0 svn:sync-from-uuid http://svn.example.com
svn propdel --revprop -r 0 svn:sync-last-merged-rev http://svn.example.com
svn propdel --revprop -r 0 svn:sync-from-url http://svn.example.com

This doesn't do much except making sure that svnsync synchronize cannot be run anymore.

edit: Just thought of something else. You might have used svn:externals properties in your projects for pointing to another repository, or another location within the same repository.

One should use the relative URL syntax for links within the same repository, in which case there is no problem. But if an absolute URL was used for that, then such links will continue to point to the original repository after an svnsync. You can inspect all svn:externals properties like this (might take a while, recursively scans all folders):

svn propget -R svn:externals http://svn.example.com/
like image 177
Wim Coenen Avatar answered Oct 05 '22 23:10

Wim Coenen