keyword: use dirstate.parents to obtain current first parent
authorChristian Ebert <blacktrash@gmx.net>
Sun, 01 Jun 2008 13:35:12 +0200
changeset 456 47bbe7c2fa7d
parent 455 10ebb9f44b99
child 457 5e2be38cb3dd
keyword: use dirstate.parents to obtain current first parent This should be quicker than changectx().node()
hgkw/keyword.py
--- a/hgkw/keyword.py	Sun Jun 01 23:47:32 2008 +0200
+++ b/hgkw/keyword.py	Sun Jun 01 13:35:12 2008 +0200
@@ -509,7 +509,7 @@
         comparing against working dir.'''
         if node2 is not None:
             kwt.matcher = util.never
-        elif node1 is not None and node1 != repo.changectx().node():
+        elif node1 is not None and node1 != repo.dirstate.parents()[0]:
             kwt.restrict = True
         patch_diff(repo, node1, node2, match, fp, changes, opts)