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

Martin von Zweigbergk martinvonz at google.com
Fri Jan 8 22:38:24 CST 2016


# 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

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
 


More information about the Mercurial-devel mailing list