Cloning a mercurial repository where .hgsub refers to a dead external subrepo

Augie Fackler durin42 at gmail.com
Sat Oct 1 01:26:31 UTC 2011


On Sep 30, 2011, at 8:09 PM, Mark Wang wrote:

> Thanks -- but the issue is that the external subrepo changed from a
> Mercurial one to a git one:
> 
> Specifically, I have in my hgrc:
> 
> ^https://cocoahttpserver.googlecode.com/hg/ = [git]
> https://code.google.com/p/cocoahttpserver/
> 
> I tried update, but I get:
> 
> pulling subrepo ToolKit/DAVServer/cocoahttpserver from [git]
> https://code.google.com/p/cocoahttpserver/
> abort: repository [git]https://code.google.com/p/cocoahttpserver/ not found!
> 
> Is this scenario even supported?

Huh. What hg version are you running?

> 
> On Fri, Sep 30, 2011 at 4:52 PM, Matt Mackall <mpm at selenic.com> wrote:
> 
>> On Fri, 2011-09-30 at 16:34 -0700, Mark Wang wrote:
>>> Hello -- We're trying to clone a Mercurial repository A where it
>> references
>>> a subrepository B that's moved hosts. We'd like to update .hgsub in A to
>>> point to the new location of B, but it's a chicken and egg problem if we
>>> can't hg clone A in the first place (it aborts when it can't find the
>>> defunct host of B).
>> 
>> First get a clone with no working directory:
>> 
>> hg clone <url> -u
>> 
>> This will skip the subrepo cloning step. Next add a new section
>> to .hg/hgrc:
>> 
>> [subpaths]
>> <some pattern> = <some replacement>
>> 
>> Then update.
>> 
>> --
>> Mathematics is the supreme nostalgia of our time.
>> 
>> 
>> 
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial



More information about the Mercurial mailing list