Merge with default stable
authorChristian Ebert <blacktrash@gmx.net>
Fri, 15 Oct 2010 00:36:45 +0200
branchstable
changeset 843 55e4ea6d1c01
parent 840 df93d61a7790 (current diff)
parent 842 12f6e285e4e7 (diff)
child 844 e5e1c16fe5b7
Merge with default
--- a/hgkw/keyword.py	Tue Jul 27 23:07:30 2010 +0900
+++ b/hgkw/keyword.py	Fri Oct 15 00:36:45 2010 +0200
@@ -594,9 +594,14 @@
     def kwfilectx_cmp(orig, self, fctx):
         # keyword affects data size, comparing wdir and filelog size does
         # not make sense
-        return self._filelog.cmp(self._filenode, fctx.data())
+        if (fctx._filerev is None and
+            (self._repo._encodefilterpats or
+             kwt.match(fctx.path()) and not 'l' in fctx.flags()) or
+            self.size() == fctx.size()):
+            return self._filelog.cmp(self._filenode, fctx.data())
+        return True
+
     extensions.wrapfunction(context.filectx, 'cmp', kwfilectx_cmp)
-
     extensions.wrapfunction(patch.patchfile, '__init__', kwpatchfile_init)
     extensions.wrapfunction(patch, 'diff', kw_diff)
     extensions.wrapfunction(cmdutil, 'copy', kw_copy)