diff hgext/keyword.py @ 15871:07893690c435 stable

keyword: update filectx.cmp monkeypatch to handle '\1\n' at start of file Analogous to 012b285cf643.
author Christian Ebert <blacktrash@gmx.net>
date Sun, 15 Jan 2012 13:37:33 +0100
parents 87248de09135
children 67964cda8701
line wrap: on
line diff
--- a/hgext/keyword.py	Wed Jan 11 16:54:29 2012 +0000
+++ b/hgext/keyword.py	Sun Jan 15 13:37:33 2012 +0100
@@ -680,7 +680,8 @@
         # not make sense
         if (fctx._filerev is None and
             (self._repo._encodefilterpats or
-             kwt.match(fctx.path()) and not 'l' in fctx.flags()) or
+             kwt.match(fctx.path()) and not 'l' in fctx.flags() or
+             self.size() - 4 == fctx.size()) or
             self.size() == fctx.size()):
             return self._filelog.cmp(self._filenode, fctx.data())
         return True