changeset 40986:328557af18eb stable

context: reimplement memfilectx.cmp() If I added a sanity check to basefilectx, test-context.py exploded. This patch copies the naive implementation from overlayworkingfilectx.
author Yuya Nishihara <yuya@tcha.org>
date Sun, 16 Dec 2018 17:08:46 +0900
parents 120ecb17242b
children bb5d74a35477
files mercurial/context.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Sat Dec 15 14:55:06 2018 -0500
+++ b/mercurial/context.py	Sun Dec 16 17:08:46 2018 +0900
@@ -2292,6 +2292,9 @@
         if copied:
             self._copied = (copied, nullid)
 
+    def cmp(self, fctx):
+        return self.data() != fctx.data()
+
     def data(self):
         return self._data