[Updated] D12104: merge: break up a not-so-one-liner for readability

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Feb 4 10:29:00 UTC 2022


Closed by commit rHG85c69b0dfa8f: merge: break up a not-so-one-liner for readability (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12104?vs=32000&id=32062

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12104/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D12104

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -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



To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220204/436436f1/attachment-0002.html>


More information about the Mercurial-patches mailing list