# HG changeset patch # User mpm@selenic.com # Date 2005-06-15 18:06:40 # Node ID 9f4077d7ef6fd889f1cc8434701b24f53784ee87 # Parent 1cb3d9d5119ee9b1c3c2978590d26ee189e65aa5 [PATCH] manifest.readflags performance buglet -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 [PATCH] manifest.readflags performance buglet From: Chris Mason 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----- diff --git a/mercurial/hg.py b/mercurial/hg.py --- a/mercurial/hg.py +++ b/mercurial/hg.py @@ -113,7 +113,7 @@ class manifest(revlog): 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]