Merge with default stable
authorChristian Ebert <blacktrash@gmx.net>
Thu, 19 Jan 2012 02:01:05 +0100
branchstable
changeset 1043 93ced643068d
parent 1041 40554705117d (current diff)
parent 1042 91e083fab1a3 (diff)
child 1044 23c6e5d22e79
Merge with default
tests/test-keyword.t
--- a/hgkw/keyword.py	Wed Jan 18 16:46:15 2012 +0100
+++ b/hgkw/keyword.py	Thu Jan 19 02:01:05 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
--- a/tests/test-keyword.t	Wed Jan 18 16:46:15 2012 +0100
+++ b/tests/test-keyword.t	Thu Jan 19 02:01:05 2012 +0100
@@ -162,13 +162,31 @@
   ignore $Id$
   a
 
-Test hook execution
-
   $ diff a hooktest
 
   $ cp $HGRCPATH.nohooks $HGRCPATH
   $ rm hooktest
 
+hg status of kw-ignored binary file starting with '\1\n'
+
+  $ printf '\1\nfoo' > i
+  $ hg -q commit -Am metasep i
+  $ hg status
+  $ printf '\1\nbar' > i
+  $ hg status
+  M i
+  $ hg -q commit -m "modify metasep" i
+  $ hg status --rev 2:3
+  M i
+  $ touch empty
+  $ hg -q commit -A -m "another file"
+  $ hg status -A --rev 3:4 i
+  C i
+
+  $ hg -q strip -n 2
+
+Test hook execution
+
 bundle
 
   $ hg bundle --base null ../kw.hg