Patchwork [9,of,9] config: register the 'devel.strip-obsmarkers' config

login
register
mail settings
Submitter Pierre-Yves David
Date June 29, 2017, 7:33 p.m.
Message ID <d2b47a9877191e6d6ca7.1498764786@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/21841/
State Accepted
Headers show

Comments

Pierre-Yves David - June 29, 2017, 7:33 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1498649556 -7200
#      Wed Jun 28 13:32:36 2017 +0200
# Node ID d2b47a9877191e6d6ca79864409b638a2ee03e5a
# Parent  273de5653735bee42ccc887204fc31c14abd79c6
# EXP-Topic config.register
# Available At https://www.mercurial-scm.org/repo/users/marmoute/mercurial/
#              hg pull https://www.mercurial-scm.org/repo/users/marmoute/mercurial/ -r d2b47a987719
config: register the 'devel.strip-obsmarkers' config

The single explicit default that existed so far is converted to registered
config value.

Patch

diff --git a/mercurial/configitems.py b/mercurial/configitems.py
--- a/mercurial/configitems.py
+++ b/mercurial/configitems.py
@@ -80,6 +80,9 @@  coreconfigitem('devel', 'serverexactprot
 coreconfigitem('devel', 'serverrequirecert',
     default=None,
 )
+coreconfigitem('devel', 'strip-obsmarkers',
+    default=True,
+)
 coreconfigitem('patch', 'fuzz',
     default=2,
 )
diff --git a/mercurial/repair.py b/mercurial/repair.py
--- a/mercurial/repair.py
+++ b/mercurial/repair.py
@@ -131,7 +131,7 @@  def strip(ui, repo, nodelist, backup=Tru
     stripbases = [cl.node(r) for r in tostrip]
 
     stripobsidx = obsmarkers = ()
-    if repo.ui.configbool('devel', 'strip-obsmarkers', True):
+    if repo.ui.configbool('devel', 'strip-obsmarkers'):
         obsmarkers = obsolete.exclusivemarkers(repo, stripbases)
     if obsmarkers:
         stripobsidx = [i for i, m in enumerate(repo.obsstore)