2

Up front, I am aware of and have looked into:

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).

enter image description here

Now a developer at our branch has three options:

  1. checkout from the remote ("upstream") repository (slow)
  2. checkout from local branch servers (faster, but still SVN speed penalty)
  3. 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?

Vadim Kotov
  • 8,084
  • 8
  • 48
  • 62
0xC0000022L
  • 20,597
  • 9
  • 86
  • 152

1 Answers1

0

AFAIK, you can't use two Subversion origins at the same time (cloned Mercurial repository will operate only with source-SVN repository later for pull and push): i.e you will not be able hg pull local + hg push remote

But, if local SVN-mirror used only once, for creating clone in Mercurial and later remote SVN is used only (push and pull), you can try replace default path in repository's .hgrc and change local URL to remote (for full mirror with shared UUID it may work)

Lazy Badger
  • 94,711
  • 9
  • 78
  • 110
  • For all practical purposes the two SVN repos are the same (UUID etc) and one of them is readonly as outlined in my question. But obviously the clone on the developer machine is based in the one created based on the `svnsync`. So what exactly do I have to give as `default` path? Why does it have to be the `default` path? Is there other meta-data that is required? – 0xC0000022L Feb 03 '14 at 17:47