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

2

8

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?

Scorify answered 20/1, 2011 at 6:33 Comment(0)
W
11

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/
Willena answered 20/1, 2011 at 17:48 Comment(3)
Any idea how to correct those svn:externals properties on existing revisions, though?Dottie
@STATUS_ACCESS_DENIED: A way to simply remap externals (like in mercurial) for existing revisions is missing in SVN. It might still be possible by rewriting history (svnadmin dump the whole repository, search-and-replace URLs, then svnadmin load in a new repo), but that is a whole other ballgame. I've never tried that.Willena
A good way to make svn:externals independent of changes to repository location, is that you use the "^/../REPO-NAME" reference. This means "whatever parent-path this repository is on, use the REPO-NAME." So if in the future, you change the hosts, paths, or protocols of your repositories that link to eachother, they will continue to work, before and after the change, back until you started using this technique.Unscreened
D
0

Basically, you need the apache configuration to:

  • reference that new repo with a different URL and a different AuthName
  • declare your new user in the conf/authz file of said new repo.
  • declaring their password (if you are using:q! AuthType Basic authentication mode)

Having different password isn't mandatory: once the two repository are managed with two different addresses (under the same apache or two different 'apache'), they will be independent one from another.

Discriminating answered 20/1, 2011 at 7:25 Comment(2)
I think the source is using the Apache type setup and at the destination I'm using svnserve over SSH (as per svnbook.red-bean.com/en/1.5/…)Scorify
@matt74m: so the authentication mechanism will be different, the addresses too. Those two repos will be fairly independent (unless you need to resync them on a regular basis)Discriminating

© 2022 - 2024 — McMap. All rights reserved.