Re: [PATCH 1 of 3 STABLE] context: reimplement memfilectx.cmp()
On Sun, 16 Dec 2018 16:20:12 +0300, Pulkit Goyal wrote: > On Sun, Dec 16, 2018 at 11:27 AM Yuya Nishihara wrote: > > # HG changeset patch > > # User Yuya Nishihara > > # 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. > > > > Did you mean the whole series is for stable or just this patch? 1 for stable, and the others for default (once merged.) I didn't tried, but memfilectx.cmp() would crash if the other fctx had data of the same size. > And how did > you managed to put the STABLE flag on just one email and not rest? I want > to learn that trick. As I'm a templater guru, I just hacked it. --config patchbomb.flagtemplate='{ifeq(node|short, "", "STABLE")}' Not lovely. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
Re: [PATCH 1 of 3 STABLE] context: reimplement memfilectx.cmp()
On Sun, Dec 16, 2018 at 11:27 AM Yuya Nishihara wrote: > # HG changeset patch > # User Yuya Nishihara > # 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. > Did you mean the whole series is for stable or just this patch? And how did you managed to put the STABLE flag on just one email and not rest? I want to learn that trick. ___ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
[PATCH 1 of 3 STABLE] context: reimplement memfilectx.cmp()
# HG changeset patch # User Yuya Nishihara # 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