# HG changeset patch # User Kyle Lippincott # Date 2018-08-05 07:53:55 # Node ID 7e75777e4a5136685c2a28de899bac96c31877da # Parent 576eef1ab43dd0782dde125046a71dc8a699f3a6 resolve: correct behavior of mark-check=none to match docs Differential Revision: https://phab.mercurial-scm.org/D4121 diff --git a/mercurial/commands.py b/mercurial/commands.py --- a/mercurial/commands.py +++ b/mercurial/commands.py @@ -4608,6 +4608,9 @@ def resolve(ui, repo, *pats, **opts): hasconflictmarkers = [] if mark: markcheck = ui.config('commands', 'resolve.mark-check') + if markcheck not in ['warn', 'abort']: + # Treat all invalid / unrecognized values as 'none'. + markcheck = False for f in ms: if not m(f): continue diff --git a/mercurial/configitems.py b/mercurial/configitems.py --- a/mercurial/configitems.py +++ b/mercurial/configitems.py @@ -194,7 +194,7 @@ coreconfigitem('commands', 'resolve.conf default=False, ) coreconfigitem('commands', 'resolve.mark-check', - default=None, + default='none', ) coreconfigitem('commands', 'show.aliasprefix', default=list, diff --git a/tests/test-resolve.t b/tests/test-resolve.t --- a/tests/test-resolve.t +++ b/tests/test-resolve.t @@ -400,6 +400,7 @@ Try with --all from the hint $ hg resolve -l R file1 R file2 +Test option value 'warn' $ hg resolve --unmark $ hg resolve -l U file1 @@ -421,6 +422,26 @@ If the file is already marked as resolve $ hg resolve -l R file1 R file2 +If the user passes an invalid value, we treat it as 'none'. + $ hg resolve --unmark + $ hg resolve -l + U file1 + U file2 + $ hg --config commands.resolve.mark-check=nope resolve -m + (no more unresolved files) + $ hg resolve -l + R file1 + R file2 +Test explicitly setting the otion to 'none' + $ hg resolve --unmark + $ hg resolve -l + U file1 + U file2 + $ hg --config commands.resolve.mark-check=none resolve -m + (no more unresolved files) + $ hg resolve -l + R file1 + R file2 $ cd ..