changeset 35281:010179e21e91

context: switch ctx() use to changectx() I added `ctx()` to `overlayworkingfilectx`, (and before that, `absentfilectx`), because `absentfilectx` had reference to this function in its `cmp()` function. But the standard is actually `changectx()`, and no other class implements `ctx()`. So let's use the standard name. (As a result, I'm not sure that part of the `absentfilectx` comparator ever worked! It was written before I added either function.) This will be necessary in the next patch. Differential Revision: https://phab.mercurial-scm.org/D1211
author Phil Cohen <phillco@fb.com>
date Fri, 01 Dec 2017 00:07:23 -0800
parents 8e72f9152c4d
children 46d7f0713a87
files mercurial/context.py mercurial/filemerge.py
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/context.py	Wed Dec 06 22:56:15 2017 -0500
+++ b/mercurial/context.py	Fri Dec 01 00:07:23 2017 -0800
@@ -2129,7 +2129,7 @@
     def cmp(self, fctx):
         return self.data() != fctx.data()
 
-    def ctx(self):
+    def changectx(self):
         return self._parent
 
     def data(self):
--- a/mercurial/filemerge.py	Wed Dec 06 22:56:15 2017 -0500
+++ b/mercurial/filemerge.py	Fri Dec 01 00:07:23 2017 -0800
@@ -469,7 +469,7 @@
     # calls might be depending on.
     from . import context
     if isinstance(fcd, context.overlayworkingfilectx):
-        fcd.ctx().flushall()
+        fcd.changectx().flushall()
 
     util.writefile(a + ".local", fcd.decodeddata())
     repo.wwrite(fd + ".other", fco.data(), fco.flags())