Problems pulling subrepos defined using relative paths from a web server

Mads Kiilerich mads at kiilerich.com
Thu May 26 13:35:49 UTC 2011


On 05/26/2011 03:14 PM, Angel Ezquerra wrote:
> On Thu, May 26, 2011 at 2:50 PM, Mads Kiilerich<mads at kiilerich.com>  wrote:
>> On 05/26/2011 02:37 PM, Angel Ezquerra wrote:
>>> The contents of the hgweb.config file are:
>>> [collections]
>>> \\mercurial\mercurial = \\mercurial\mercurial
>>
>> That seems strange. AFAIK the right hand side should be URL paths where
>> backslashes has no use.
>
> The example in http://mercurial.selenic.com/wiki/PublishingRepositories is:
>
> [collections]
> /home/user = /home/user
>
> I think our configuration is equivalent.

You are right. But it seems strange and I had forgotten that that is the 
way it is with collections. ;-)

>>> So I'm using collections rather than paths.
>>>
>>> The repo http://mercurial:8000/myrepo/include/mysub cannot be accessed.
>>>
>>> Supposedly the configuration above should tell hg serve to publish
>>> _any_ folder contained within \\mercurial\mercurial or any of its
>>> folders (recursively).
>>
>> No, it is not recursive.
>
> Actually it is recursive. It just seems to not recurse into
> subfolders. This is (part of) the list of repositories that I get when
> I access the main server page (at http://mercurial:8000):
>
> CORE/SDKs/Core_Services_SDK 	Repository on Mercurial
> CORE/TOOLS/CfgBootLdr 	Repository on Mercurial
> CORE/TOOLS/RebootMCH 	Repository on Mercurial
> DRIVERS/SWC_Platform_Drivers 	Repository on Mercurial
> HSPA/3G_DRV/3GDrv 	Repository on Mercurial
>
> As you can see there are repos in several different folders at several
> different depths.

Actually it is not recursive - by the definition of 'recursive' 
Mercurial uses (in mercurial/hgweb/hgwebdir_mod.py and mercurial/util.py 
walkrepos). But you are right, by the usual definition of 'recursive' it 
is recursive 'with exceptions'.

So: Paths with * (and collections, apparently) will not recurse into hg 
working directories - paths with ** will.

If you use some kind of long-lived hgweb process beware of caching and 
the hgweb refresh interval of 20 seconds.

/Mads



More information about the Mercurial mailing list