[PATCH] fix cold cache diff performance

Chris Mason mason at suse.com
Thu Jun 22 10:27:12 CDT 2006


# HG changeset patch
# User Chris Mason <mason at suse.com>
Fix localrepo.changes()  Correctly decide if we are diffing the working dir

diff -r 287b7da4aeaa -r b200a4775fb9 mercurial/localrepo.py
--- a/mercurial/localrepo.py	Wed Jun 21 16:20:21 2006 -0700
+++ b/mercurial/localrepo.py	Thu Jun 22 11:24:08 2006 -0400
@@ -619,7 +619,7 @@ class localrepository(object):
 
         modified, added, removed, deleted, unknown, ignored = [],[],[],[],[],[]
         compareworking = False
-        if not node1 or node1 == self.dirstate.parents()[0]:
+        if not node1 or (not node2 and node1 == self.dirstate.parents()[0]):
             compareworking = True
 
         if not compareworking:


More information about the Mercurial mailing list