Subrepos: relative paths & cloning locally, over http and ssh

Mike Williams obsd1 at eandem.co.uk
Mon Jan 31 15:35:55 CST 2011


Hi,

On 01/31/11 10:13, Dale Wijnand wrote:
> Hello,
> I had an issue with cloning a repository with a subrepository
> and couldn't find an easy fit-all solution.
>
> I switched over from this in .hgsub:
> dep1 = ../dep1
>
> to this:
> dep1 = dep1
>
> so that local clones worked.
>
> However that didn't work for cloning over http.

If you are using hg serve then create an hgweb config-file with the 
following content:

[paths]
project = .
proejct/dep1 = ./dep1

When you want to share over http then start with the comand

hg serve --web-conf config-file

The config file allows you a lot of control of how things are presented 
over http, but for simple quick sharing generation of the [paths] 
section is a mechanical translation from the contents of the .hgsub 
file, it would be nice if Mercurial could do that when serving a repo 
with sub-repos and no web-conf file is specified.  Otherwise you have to 
maintain two files when using sub-repos and want to quickly serve them 
over http.

> How can I make all 3 things work well and easily together?

I haven't used mercurial with ssh to know if this helps there or not.

HTH

-- 
Mike


More information about the Mercurial mailing list