[PATCH] manifest.readflags performance buglet
authormpm@selenic.com
Wed, 15 Jun 2005 10:06:40 -0800
changeset 358 9f4077d7ef6f
parent 357 1cb3d9d5119e
child 359 0c4688e9ee5c
[PATCH] manifest.readflags performance buglet -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] manifest.readflags performance buglet From: Chris Mason <mason@suse.com> Performance buglet in manifest.readflags: only re-read the manifest when the mapcache is not present or does not correspond to this node manifest hash: 188ad778308a2e5c885d452d7b7e61c082e8ceb2 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCsG4wywK+sNU5EO8RAv+IAJ9sU87MythE/HYf3wH/V7ctzNdR1gCfclr9 ydsk6wtk/n6uKb4U7BvGvLM= =5cOx -----END PGP SIGNATURE-----
mercurial/hg.py
--- a/mercurial/hg.py	Wed Jun 15 10:05:45 2005 -0800
+++ b/mercurial/hg.py	Wed Jun 15 10:06:40 2005 -0800
@@ -113,7 +113,7 @@
 
     def readflags(self, node):
         if node == nullid: return {} # don't upset local cache
-        if self.mapcache or self.mapcache[0] != node:
+        if not self.mapcache or self.mapcache[0] != node:
             self.read(node)
         return self.mapcache[2]