errors: use detailed exit code when trying to merge file outside narrowspec
authorMartin von Zweigbergk <martinvonz@google.com>
Fri, 19 Nov 2021 15:39:35 -0800
changeset 48366 8e855e9984a6
parent 48365 67064c238ae7
child 48367 0b8e076e878c
errors: use detailed exit code when trying to merge file outside narrowspec Differential Revision: https://phab.mercurial-scm.org/D11827
mercurial/merge.py
tests/test-narrow-merge.t
tests/test-narrow-rebase.t
--- a/mercurial/merge.py	Fri Nov 19 15:38:36 2021 -0800
+++ b/mercurial/merge.py	Fri Nov 19 15:39:35 2021 -0800
@@ -542,7 +542,7 @@
                 hint=_(b'merging in the other direction may work'),
             )
         else:
-            raise error.Abort(
+            raise error.StateError(
                 _(b'conflict in file \'%s\' is outside narrow clone') % f
             )
 
--- a/tests/test-narrow-merge.t	Fri Nov 19 15:38:36 2021 -0800
+++ b/tests/test-narrow-merge.t	Fri Nov 19 15:39:35 2021 -0800
@@ -101,4 +101,4 @@
   $ hg merge 'desc("conflicting outside/f1")'
   abort: conflict in file 'outside/f1' is outside narrow clone (flat !)
   abort: conflict in file 'outside/' is outside narrow clone (tree !)
-  [255]
+  [20]
--- a/tests/test-narrow-rebase.t	Fri Nov 19 15:38:36 2021 -0800
+++ b/tests/test-narrow-rebase.t	Fri Nov 19 15:39:35 2021 -0800
@@ -96,4 +96,4 @@
   $ hg rebase -d 'desc("modify outside/f1")'
   rebasing 4:707c035aadb6 "conflicting outside/f1"
   abort: conflict in file 'outside/f1' is outside narrow clone
-  [255]
+  [20]