changeset 6117:c74f1d9092f8

keyword: do not inspect node1 for diff if node2 is given
author Christian Ebert <blacktrash@gmx.net>
date Fri, 15 Feb 2008 18:37:00 +0100
parents e27f39865d7e
children b69a39ab4745 f7f25f58693a
files hgext/keyword.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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