Up front, I am aware of and have looked into:
- https://www.mercurial-scm.org/wiki/HgSubversion
- https://www.mercurial-scm.org/wiki/WorkingWithSubversion
unfortunately neither discuss the problem at hand.
The question
How can I teach an existing Mercurial repository that was not cloned from an SVN repository directly that it has an SVN repository "parent" to push to?
The existing setup
We have a situation where due to bandwidth issues I have svnsync
'd a remote "upstream" SVN repository over to our local branch servers. During this process after each successful synchronization, the respective cron
job will hg pull
changes from the local svnsync
'd SVN repository into a Mercurial clone. All of that works fine and the svnsync
'd repository is configured to refuse any commits, but shares the UUID with the "upstream" repository (so that svn switch --relocate ...
works).
Now a developer at our branch has three options:
- checkout from the remote ("upstream") repository (slow)
- checkout from local branch servers (faster, but still SVN speed penalty)
- clone Hg repo from local branch servers (fastest)
So in order to get the last version to work, I'd need to be able to tell the local clone about the remote "upstream" SVN repository. How do I do that?