commitablectx: fix the default phase
The code was ignoring the config option. Since the config option will control
the actual phase of the committed result, we better take it in account early.
Differential Revision: https://phab.mercurial-scm.org/D7726
--- a/mercurial/context.py Wed Dec 18 14:07:58 2019 -0800
+++ b/mercurial/context.py Fri Dec 27 16:47:47 2019 +0100
@@ -1439,7 +1439,7 @@
return b
def phase(self):
- phase = phases.draft # default phase to draft
+ phase = phases.newcommitphase(self._repo.ui)
for p in self.parents():
phase = max(phase, p.phase())
return phase