D5218: resolve: when resolve.mark-check=abort, downgrade to warning if pats specified

spectral (Kyle Lippincott) phabricator at mercurial-scm.org
Sat Nov 3 22:18:44 EDT 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGda2e874fe582: resolve: when resolve.mark-check=abort, downgrade to warning if pats specified (authored by spectral, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5218?vs=12379&id=12391

REVISION DETAIL
  https://phab.mercurial-scm.org/D5218

AFFECTED FILES
  mercurial/commands.py
  tests/test-resolve.t

CHANGE DETAILS

diff --git a/tests/test-resolve.t b/tests/test-resolve.t
--- a/tests/test-resolve.t
+++ b/tests/test-resolve.t
@@ -445,6 +445,19 @@
   $ hg resolve -l
   R file1
   R file2
+Test with marking an explicit file as resolved, this should not abort (since
+there's no --force flag, we have no way of combining --all with a filename)
+  $ hg resolve --unmark
+  $ hg resolve -l
+  U file1
+  U file2
+(This downgrades to a warning since an explicit file was specified).
+  $ hg --config commands.resolve.mark-check=abort resolve -m file2
+  warning: the following files still have conflict markers:
+    file2
+  $ hg resolve -l
+  U file1
+  R file2
 Testing the --re-merge flag
   $ hg resolve --unmark file1
   $ hg resolve -l
diff --git a/mercurial/commands.py b/mercurial/commands.py
--- a/mercurial/commands.py
+++ b/mercurial/commands.py
@@ -4912,7 +4912,7 @@
         if hasconflictmarkers:
             ui.warn(_('warning: the following files still have conflict '
                       'markers:\n  ') + '\n  '.join(hasconflictmarkers) + '\n')
-            if markcheck == 'abort' and not all:
+            if markcheck == 'abort' and not all and not pats:
                 raise error.Abort(_('conflict markers detected'),
                                   hint=_('use --all to mark anyway'))
 



To: spectral, #hg-reviewers
Cc: yuja, mercurial-devel


More information about the Mercurial-devel mailing list