diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -1006,6 +1006,12 @@ class commitablectx(basectx): b.extend(p.bookmarks()) return b + def phase(self): + phase = phases.draft # default phase to draft + for p in self.parents(): + phase = max(phase, p.phase()) + return phase + class workingctx(commitablectx): """A workingctx object makes access to data related to the current working directory convenient. @@ -1032,12 +1038,6 @@ class workingctx(commitablectx): p = p[:-1] return [changectx(self._repo, x) for x in p] - def phase(self): - phase = phases.draft # default phase to draft - for p in self.parents(): - phase = max(phase, p.phase()) - return phase - def hidden(self): return False