# HG changeset patch # User Yuya Nishihara <y...@tcha.org> # Date 1544947726 -32400 # Sun Dec 16 17:08:46 2018 +0900 # Node ID 79dc95eb84b0f09a39fb396c65ec591f9f0de224 # Parent f1a69099327b6c3d92d2541fe8d40f8fe37a546e context: reimplement memfilectx.cmp()
If I added a sanity check to basefilectx, test-context.py exploded. This patch copies the naive implementation from overlayworkingfilectx. diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -2330,6 +2330,9 @@ class memfilectx(committablefilectx): if copied: self._copied = (copied, nullid) + def cmp(self, fctx): + return self.data() != fctx.data() + def data(self): return self._data _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel