Patchwork [2,of,2] configitems: update default value of 'phases.new-commit'

login
register
mail settings
Submitter Boris Feld
Date Oct. 9, 2017, 3:51 p.m.
Message ID <c4b29d40d4823d023311.1507564279@FB>
Download mbox | patch
Permalink /patch/24657/
State Accepted
Headers show

Comments

Boris Feld - Oct. 9, 2017, 3:51 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1507559503 -7200
#      Mon Oct 09 16:31:43 2017 +0200
# Node ID c4b29d40d4823d0233110e8de36b26ec71ef29af
# Parent  a5d695caa0ad1b30d0542417472865cf0529059d
# EXP-Topic config.register.followup
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r c4b29d40d482
configitems: update default value of 'phases.new-commit'

Now that mq is cleaned up, we can rely on the config register for the default
value. We switch the default from the integer to human readable value to help
with future automatic documentation that could be generated from the config
register.

Patch

diff -r a5d695caa0ad -r c4b29d40d482 mercurial/configitems.py
--- a/mercurial/configitems.py	Mon Oct 09 17:33:03 2017 +0200
+++ b/mercurial/configitems.py	Mon Oct 09 16:31:43 2017 +0200
@@ -333,7 +333,7 @@ 
     default='follow',
 )
 coreconfigitem('phases', 'new-commit',
-    default=dynamicdefault,
+    default='draft',
 )
 coreconfigitem('phases', 'publish',
     default=True,
diff -r a5d695caa0ad -r c4b29d40d482 mercurial/phases.py
--- a/mercurial/phases.py	Mon Oct 09 17:33:03 2017 +0200
+++ b/mercurial/phases.py	Mon Oct 09 16:31:43 2017 +0200
@@ -619,7 +619,7 @@ 
     Handle all possible values for the phases.new-commit options.
 
     """
-    v = ui.config('phases', 'new-commit', draft)
+    v = ui.config('phases', 'new-commit')
     try:
         return phasenames.index(v)
     except ValueError: