# HG changeset patch # User Sean Farley # Date 2013-08-14 21:37:01 # Node ID 210cc42a8ac2ff556e70d6813c170157eb2b41be # Parent 6c52adcaba0ed14d510c9d44f255ea5daf07fa7a commitablectx: move ancestor from workingctx diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1030,6 +1030,10 @@ class commitablectx(basectx): except OSError: return '' + def ancestor(self, c2): + """return the ancestor context of self and c2""" + return self._parents[0].ancestor(c2) # punt on two parents for now + class workingctx(commitablectx): """A workingctx object makes access to data related to the current working directory convenient. @@ -1061,10 +1065,6 @@ class workingctx(commitablectx): return workingfilectx(self._repo, path, workingctx=self, filelog=filelog) - def ancestor(self, c2): - """return the ancestor context of self and c2""" - return self._parents[0].ancestor(c2) # punt on two parents for now - def walk(self, match): return sorted(self._repo.dirstate.walk(match, sorted(self.substate), True, False))