Minor caching improvement for manifest
authormpm@selenic.com
Sun, 12 Jun 2005 08:23:29 -0800
changeset 313 e75ea4662d81
parent 312 09375250eb31
child 314 3402cb9a4c06
Minor caching improvement for manifest -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Minor caching improvement for manifest manifest hash: 91d827f4041f1151875a52199618cdd1a219ac79 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCrGGBywK+sNU5EO8RAotVAJ93JTk6XoHnZrbGzcZQ1N+P7kNKiACfYj+F RlcmcLHc3rEMkcM127BszDg= =5zAN -----END PGP SIGNATURE-----
mercurial/hg.py
--- a/mercurial/hg.py	Sun Jun 12 08:11:43 2005 -0800
+++ b/mercurial/hg.py	Sun Jun 12 08:23:29 2005 -0800
@@ -97,6 +97,7 @@
         revlog.__init__(self, opener, "00manifest.i", "00manifest.d")
 
     def read(self, node):
+        if node == nullid: return {} # don't upset local cache
         if self.mapcache and self.mapcache[0] == node:
             return self.mapcache[1].copy()
         text = self.revision(node)
@@ -111,6 +112,7 @@
         return map
 
     def readflags(self, node):
+        if node == nullid: return {} # don't upset local cache
         if self.mapcache or self.mapcache[0] != node:
             self.read(node)
         return self.mapcache[2]