Patchwork [06,of,13] configitems: register 'merge.checkunknown' and 'merge.checkignored'

login
register
mail settings
Submitter Boris Feld
Date Oct. 9, 2017, 8:21 a.m.
Message ID <71e83aee3eb9ff505e94.1507537313@FB>
Download mbox | patch
Permalink /patch/24649/
State Accepted
Headers show

Comments

Boris Feld - Oct. 9, 2017, 8:21 a.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1507492120 -7200
#      Sun Oct 08 21:48:40 2017 +0200
# Node ID 71e83aee3eb9ff505e94127ffb83c2b6fc6642bf
# Parent  fe09fec9dd8586ed9768feaa6f5cf6aadcc663c8
# EXP-Topic config.register
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 71e83aee3eb9
configitems: register 'merge.checkunknown' and 'merge.checkignored'

They both use the same function defining a default, so we need to update them at
the same time.

Patch

diff -r fe09fec9dd85 -r 71e83aee3eb9 mercurial/configitems.py
--- a/mercurial/configitems.py	Sun Oct 08 21:47:14 2017 +0200
+++ b/mercurial/configitems.py	Sun Oct 08 21:48:40 2017 +0200
@@ -344,6 +344,12 @@ 
 coreconfigitem('http_proxy', 'user',
     default=None,
 )
+coreconfigitem('merge', 'checkunknown',
+    default='abort',
+)
+coreconfigitem('merge', 'checkignored',
+    default='abort',
+)
 coreconfigitem('merge', 'followcopies',
     default=True,
 )
diff -r fe09fec9dd85 -r 71e83aee3eb9 mercurial/merge.py
--- a/mercurial/merge.py	Sun Oct 08 21:47:14 2017 +0200
+++ b/mercurial/merge.py	Sun Oct 08 21:48:40 2017 +0200
@@ -603,7 +603,7 @@ 
         self._results[f] = 0, 'g'
 
 def _getcheckunknownconfig(repo, section, name):
-    config = repo.ui.config(section, name, default='abort')
+    config = repo.ui.config(section, name)
     valid = ['abort', 'ignore', 'warn']
     if config not in valid:
         validstr = ', '.join(["'" + v + "'" for v in valid])