changeset 48414:8e855e9984a6

errors: use detailed exit code when trying to merge file outside narrowspec Differential Revision: https://phab.mercurial-scm.org/D11827
author Martin von Zweigbergk <martinvonz@google.com>
date Fri, 19 Nov 2021 15:39:35 -0800
parents 67064c238ae7
children 0b8e076e878c
files mercurial/merge.py tests/test-narrow-merge.t tests/test-narrow-rebase.t
diffstat 3 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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]