[PATCH 2 of 2] changegroup: don't add a second trailing '/' in dir name

Augie Fackler raf at durin42.com
Fri Jan 8 23:06:17 CST 2016


> On Jan 8, 2016, at 11:38 PM, Martin von Zweigbergk <martinvonz at google.com> wrote:
> 
> # HG changeset patch
> # User Martin von Zweigbergk <martinvonz at google.com>
> # Date 1452293222 28800
> #      Fri Jan 08 14:47:02 2016 -0800
> # Node ID e35aa514e425b6ec2989a1c56e4a81c21a4c6996
> # Parent  b5585dfd2eef186091a25d7f4ff026c73dddc89e
> changegroup: don't add a second trailing '/' in dir name

Queued these, nice catches.

> 
> The paths given from treemanifest.dir() already contains the trailing
> slash.
> 
> diff --git a/mercurial/changegroup.py b/mercurial/changegroup.py
> --- a/mercurial/changegroup.py
> +++ b/mercurial/changegroup.py
> @@ -903,8 +903,8 @@
>         dirlog = self._repo.manifest.dirlog
>         for name, nodes in tmfnodes.iteritems():
>             # For now, directory headers are simply file headers with
> -            # a trailing '/' on the path.
> -            yield self.fileheader(name + '/')
> +            # a trailing '/' on the path (already in the name).
> +            yield self.fileheader(name)
>             for chunk in self.group(nodes, dirlog(name), nodes.get):
>                 yield chunk
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20160109/6f564362/attachment.pgp>


More information about the Mercurial-devel mailing list