workingfilectx.cmp: invert boolean return value stable
authorNicolas Dumazet <nicdumz.commits@gmail.com>
Fri, 09 Jul 2010 11:59:48 +0900
branchstable
changeset 11538 16fe98804fd8
parent 11537 0a044e5ff489
child 11539 a463e3c50212
workingfilectx.cmp: invert boolean return value Apparently we mostly used filectx.cmp(workingfilectx.read()), so no error was ever triggered, but since all cmp() methods return True when content are different, that == should in fact be !=
mercurial/context.py
--- a/mercurial/context.py	Mon Jul 12 19:04:07 2010 +0900
+++ b/mercurial/context.py	Fri Jul 09 11:59:48 2010 +0900
@@ -932,7 +932,7 @@
             return (t, tz)
 
     def cmp(self, text):
-        return self._repo.wread(self._path) == text
+        return self._repo.wread(self._path) != text
 
 class memctx(object):
     """Use memctx to perform in-memory commits via localrepo.commitctx().