From patchwork Thu Mar 26 17:49:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [3, of, 4, v2] treemanifest: drop 22nd byte for consistency with manifestdict From: Martin von Zweigbergk X-Patchwork-Id: 8300 Message-Id: <9c12d179874831c82113.1427392144@martinvonz.mtv.corp.google.com> To: mercurial-devel@selenic.com Cc: Augie Fackler Date: Thu, 26 Mar 2015 10:49:04 -0700 # HG changeset patch # User Martin von Zweigbergk # Date 1427388141 25200 # Thu Mar 26 09:42:21 2015 -0700 # Node ID 9c12d179874831c8211309995c44324f0f66efa7 # Parent c99862a283585e40e907b9116a7736de6a3f4369 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. diff -r c99862a28358 -r 9c12d1798748 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."""