commitablectx: fix the default phase
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 27 Dec 2019 16:47:47 +0100
changeset 43968 bbcf78c4ff90
parent 43967 eebdd6709868
child 43969 8f67735344ae
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
mercurial/context.py
--- 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