Problems pulling subrepos defined using relative paths from a web server

Mads Kiilerich mads at
Thu May 26 07:18:39 CDT 2011

On 05/26/2011 02:03 PM, Angel Ezquerra wrote:
> Hi,
> I just hit an unexpected problem while using trivially defined
> subrepos (i.e. of the sort defined with a line such as "subrepo_path =
> subrepo_path" in the .hgsub file).
> This problem happens when you try to update to a revision that
> requires you to pull changes from the subrepo. The problem only
> happens if you pull from an http source.
> Let's say that you have a subrepo defined as:
> include/mysub = include/mysub
> Let's also say that the pull source for your top repo is
> http://myserver:8000/myrepo
> Then you try to update to a revision that requires mercurial to pull
> new revisions for the subrepo. Mercurial says:
>     pulling subrepo include\mysub from http://mercurial:8000/myrepo/include/mysub
>     HTTP Error: 404 (Not Found)
>     [command returned code 255 Thu May 26 13:05:32 2011]

How has your web server been configured?

Please make sure that you can browse and clone 
http://mercurial:8000/myrepo/include/mysub directly - otherwise it will 
also not work as subrepo.

You might want to use something like
   / = **
in your hgweb config.

> In our case the repo in http://mercurial:8000/myrepo is also shared as
> \\mercurial\mercurial\myrepo. Changing the pull source to
> "\\mercurial\mercurial\myrepo" and pulling works.
> So what happened? The include/mysub folder does exist within
> http://mercurial:8000/myrepo. However the mercurial web server does
> not publish it!
> Initially I thought that I had to restart the server for it to pick up
> the new folder (since this subrepo has been recently created), but
> that is not the case. Even after a restart hg web does not publish the
> subrepo. Note that we have configure hg serve to publish all subrepos
> inside the \\mercurial\mercurial folder.
> Is there something I'm missing? It seems that this problem is serious
> enough to make relative subrepo definitions (which is the recommended
> method to define subrepos) unusable when working with repos published
> through hg serve!
> Angel
> P.S.- I don't know if I should have sent this to mercurial at
> instead. Sorry if this is the wrong mailing list.

Yes, that would have been more appropriate - please make sure to remove 
-devel when you reply to this mail.


More information about the Mercurial-devel mailing list