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

login
register
mail settings
Submitter Katsunori FUJIWARA
Date June 29, 2017, 4:53 p.m.
Message ID <14a0f53f998eb8c97819.1498755188@speaknoevil>
Download mbox | patch
Permalink /patch/21824/
State Accepted
Headers show

Comments

Katsunori FUJIWARA - June 29, 2017, 4:53 p.m.
# HG changeset patch
# User FUJIWARA Katsunori <foozy@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.

Patch

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):