[PATCH 1 of 8] manifest: apply checkambig=True only for root 00manifest.i

FUJIWARA Katsunori foozy at lares.dti.ne.jp
Thu Jun 29 16:53:08 UTC 2017


# HG changeset patch
# User FUJIWARA Katsunori <foozy at lares.dti.ne.jp>
# Date 1498754868 -32400
#      Fri Jun 30 01:47:48 2017 +0900
# Node ID 14a0f53f998eb8c9781942fb6d6eb6bdc14cfcfd
# Parent  98e2c78e309cf750fa6dff6c8965fb24b979022c
manifest: apply checkambig=True only for root 00manifest.i

This is a fix for my 14ad8e2a4abe, which used 'bool(dir)' as
checkambig value for revlog.__init__().

I can't remember why I did so in 14ad8e2a4abe, but this is obviously
wrong, because only root indexfile is cached via filecache-ed property
of localrepository.

diff --git a/mercurial/manifest.py b/mercurial/manifest.py
--- a/mercurial/manifest.py
+++ b/mercurial/manifest.py
@@ -1230,7 +1230,8 @@ class manifestrevlog(revlog.revlog):
             self._dirlogcache = {'': self}
 
         super(manifestrevlog, self).__init__(opener, indexfile,
-                                             checkambig=bool(dir))
+                                             # only root indexfile is cached
+                                             checkambig=not bool(dir))
 
     @property
     def fulltextcache(self):


More information about the Mercurial-devel mailing list