treemanifest: drop 22nd byte for consistency with manifestdict
authorMartin von Zweigbergk <martinvonz@google.com>
Thu, 26 Mar 2015 09:42:21 -0700
changeset 24467 bfb754050ccd
parent 24466 f310ca66a704
child 24468 016b71ea7dc7
treemanifest: drop 22nd byte for consistency with manifestdict When assigning a 22-byte hash to a nodeid in a manifest, manifestdict drops the 22nd byte, while treemanifest keeps it. Let's make treemanifest drop the 22nd byte as well.
mercurial/manifest.py
--- a/mercurial/manifest.py	Wed Mar 25 14:13:46 2015 -0700
+++ b/mercurial/manifest.py	Thu Mar 26 09:42:21 2015 -0700
@@ -447,7 +447,7 @@
                 self._dirs[dir] = treemanifest(self._subpath(dir))
             self._dirs[dir].__setitem__(subpath, n)
         else:
-            self._files[f] = n
+            self._files[f] = n[:21] # to match manifestdict's behavior
 
     def setflag(self, f, flags):
         """Set the flags (symlink, executable) for path f."""