keyword: do not inspect node1 for diff if node2 is given
authorChristian Ebert <blacktrash@gmx.net>
Fri, 15 Feb 2008 18:37:00 +0100
changeset 6117 c74f1d9092f8
parent 6116 e27f39865d7e
child 6118 b69a39ab4745
child 6123 f7f25f58693a
keyword: do not inspect node1 for diff if node2 is given
hgext/keyword.py
--- a/hgext/keyword.py	Fri Feb 15 18:36:49 2008 +0100
+++ b/hgext/keyword.py	Fri Feb 15 18:37:00 2008 +0100
@@ -123,7 +123,7 @@
     comparing against working dir.'''
     if node2 is not None:
         kwtools['templater'].matcher = util.never
-    if node1 is not None and node1 != repo.changectx().node():
+    elif node1 is not None and node1 != repo.changectx().node():
         kwtools['templater'].restrict = True
     _patch_diff(repo, node1=node1, node2=node2, files=files, match=match,
                 fp=fp, changes=changes, opts=opts)
@@ -458,7 +458,7 @@
     files configured at all for keyword substitution.'''
 
     try:
-        if (not repo.local() or kwtools['hgcmd'] in nokwcommands.split() 
+        if (not repo.local() or kwtools['hgcmd'] in nokwcommands.split()
             or '.hg' in util.splitpath(repo.root)
             or repo._url.startswith('bundle:')):
             return