changeset 48715:85c69b0dfa8f

merge: break up a not-so-one-liner for readability (even if not fully satisfied this time) Differential Revision: https://phab.mercurial-scm.org/D12104
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 28 Jan 2022 14:24:30 +0100
parents d8577d00c023
children ec23b0ba85c2
files mercurial/merge.py
diffstat 1 files changed, 5 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Fri Jan 28 14:23:56 2022 +0100
+++ b/mercurial/merge.py	Fri Jan 28 14:24:30 2022 +0100
@@ -530,14 +530,12 @@
         elif action[0] in mergestatemod.NO_OP_ACTIONS:
             mresult.removefile(f)  # merge does not affect file
         elif action[0] in nonconflicttypes:
-            raise error.Abort(
-                _(
-                    b'merge affects file \'%s\' outside narrow, '
-                    b'which is not yet supported'
-                )
-                % f,
-                hint=_(b'merging in the other direction may work'),
+            msg = _(
+                b'merge affects file \'%s\' outside narrow, '
+                b'which is not yet supported'
             )
+            hint = _(b'merging in the other direction may work')
+            raise error.Abort(msg % f, hint=hint)
         else:
             raise error.StateError(
                 _(b'conflict in file \'%s\' is outside narrow clone') % f