Cloning mercurial repo with subrepo without network connection
Angel Ezquerra
angel.ezquerra at gmail.com
Wed Oct 12 16:10:59 UTC 2011
On Wed, Oct 12, 2011 at 1:43 AM, Isaac Jurado <diptongo at gmail.com> wrote:
> On Tue, Oct 11, 2011 at 8:30 PM, Sergey Kishchenko <voidwrk at gmail.com> wrote:
>>
>> Hi, thanks for the answer. It seems the subpaths rewriting rules can
>> be a way around the issue. But these rewriting rules just allow to
>> replace the centralized repo url with new one without affecting the
>> .hgsub. It doesn't make the mercurial a distributed VCS once again. I
>> can't find any discussion or document that describes why subrepos work
>> in the way they work now.
>
> You can define theese rules on a per-repository basis if you define them
> in the repo/.hg/hgrc file. In fact, they are applied sequentially as
> the RC files are processed: first /etc/mercurial/hgrc, then $HOME/.hgrc
> and then repo/.hg/hgrc.
>
> I don't know how much more magic are you asking for. Not all other DVCS
> implement a subrepository equivalent functionality, and those that do
> approach the problem very similarly to Mercurial.
>
> I'm sure if you have a better idea on how to be more distribute while
> maintaining a reasonable command API, the developers will be glad to
> read it.
Not long ago there was some discussion (on the dev mailing list, I
believe) where Martin Geisler suggested that the local subrepo clones
should be used as a sort of "cache" so that performing a local clone
would use the local subrepo repositories as a source by default. I
think that would be some neat magic :-)
Angel
More information about the Mercurial
mailing list