errors: use detailed exit code when trying to merge file outside narrowspec
Differential Revision: https://phab.mercurial-scm.org/D11827
--- 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]