mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
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
This commit is contained in:
parent
1eac95a707
commit
5992e0fe48
@ -2129,7 +2129,7 @@ class overlayworkingfilectx(workingfilectx):
|
||||
def cmp(self, fctx):
|
||||
return self.data() != fctx.data()
|
||||
|
||||
def ctx(self):
|
||||
def changectx(self):
|
||||
return self._parent
|
||||
|
||||
def data(self):
|
||||
|
@ -469,7 +469,7 @@ def _idump(repo, mynode, orig, fcd, fco, fca, toolconf, files, labels=None):
|
||||
# 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())
|
||||
|
Loading…
Reference in New Issue
Block a user