Problems pulling subrepos defined using relative paths from a web server

Angel Ezquerra angel.ezquerra at gmail.com
Thu May 26 07:03:13 CDT 2011


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]

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 selenic.com
instead. Sorry if this is the wrong mailing list.


More information about the Mercurial-devel mailing list