comparison mercurial/context.py @ 11538:16fe98804fd8 stable

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 !=
author Nicolas Dumazet <nicdumz.commits@gmail.com>
date Fri, 09 Jul 2010 11:59:48 +0900
parents 2ee26044d846
children a463e3c50212
comparison
equal deleted inserted replaced
11537:0a044e5ff489 11538:16fe98804fd8
930 if err.errno != errno.ENOENT: 930 if err.errno != errno.ENOENT:
931 raise 931 raise
932 return (t, tz) 932 return (t, tz)
933 933
934 def cmp(self, text): 934 def cmp(self, text):
935 return self._repo.wread(self._path) == text 935 return self._repo.wread(self._path) != text
936 936
937 class memctx(object): 937 class memctx(object):
938 """Use memctx to perform in-memory commits via localrepo.commitctx(). 938 """Use memctx to perform in-memory commits via localrepo.commitctx().
939 939
940 Revision information is supplied at initialization time while 940 Revision information is supplied at initialization time while