[PATCH V4] serve: add support for Mercurial subrepositories

Matt Harbison mharbison72 at gmail.com
Sun Apr 16 21:41:41 EDT 2017


On Sun, 16 Apr 2017 06:20:24 -0400, Yuya Nishihara <yuya at tcha.org> wrote:

> On Sat, 15 Apr 2017 19:00:48 -0400, Matt Harbison wrote:
>> # HG changeset patch
>> # User Matt Harbison <matt_harbison at yahoo.com>
>> # Date 1492293940 14400
>> #      Sat Apr 15 18:05:40 2017 -0400
>> # Node ID 2804acb18b59dec98abb216d813cc0e3ecec4e14
>> # Parent  3fd50d5f9314a96f43eb73480763f224c4d05831
>> serve: add support for Mercurial subrepositories
>
> Looks good. Queued, thanks.
>
>> +def addwebdirpath(repo, serverpath, webconf):
>> +    webconf[serverpath] = repo.root
>> +    repo.ui.debug('adding %s = %s\n' % (serverpath, repo.root))
>> +
>> +    for r in repo.revs('filelog("path:.hgsub")'):
>> +        ctx = repo[r]
>> +        for subpath in ctx.substate:
>> +            ctx.sub(subpath).addwebdirpath(serverpath, webconf)
>
> [...]
>
>> +    @annotatesubrepoerror
>> +    def addwebdirpath(self, serverpath, webconf):
>> +        cmdutil.addwebdirpath(self._repo, subrelpath(self), webconf)
>
> 'serverpath' isn't used. Perhaps this wouldn't work if addwebdirpath()  
> starts
> with non-empty serverpath.

Oops.  It will be a problem with the with the -S + --web-conf patch I  
have, but I'll wait until after the freeze for that.  As it is now,  
there's no way for serverpath to start non-empty.


More information about the Mercurial-devel mailing list