# HG changeset patch # User Martin von Zweigbergk # Date 2021-11-19 23:39:35 # Node ID 8e855e9984a67bb8346beec4483bfadbc7c38e35 # Parent 67064c238ae730e65a9de591abe0113687870020 errors: use detailed exit code when trying to merge file outside narrowspec Differential Revision: https://phab.mercurial-scm.org/D11827 diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -542,7 +542,7 @@ def _filternarrowactions(narrowmatch, br 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 ) diff --git a/tests/test-narrow-merge.t b/tests/test-narrow-merge.t --- a/tests/test-narrow-merge.t +++ b/tests/test-narrow-merge.t @@ -101,4 +101,4 @@ Refuses merge of conflicting outside cha $ 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] diff --git a/tests/test-narrow-rebase.t b/tests/test-narrow-rebase.t --- a/tests/test-narrow-rebase.t +++ b/tests/test-narrow-rebase.t @@ -96,4 +96,4 @@ Rebase interrupts on conflicting changes $ 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]