merge: break up a not-so-one-liner for readability
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 28 Jan 2022 14:25:32 +0100
changeset 48704 58a2c66fa94c
parent 48703 6c4b10d01af0
child 48705 bca57b01518f
merge: break up a not-so-one-liner for readability Differential Revision: https://phab.mercurial-scm.org/D12107
mercurial/merge.py
--- a/mercurial/merge.py	Fri Jan 28 14:25:05 2022 +0100
+++ b/mercurial/merge.py	Fri Jan 28 14:25:32 2022 +0100
@@ -1922,13 +1922,9 @@
                 hint = _(b"use 'hg resolve' to resolve")
                 raise error.StateError(msg, hint=hint)
         if branchmerge:
+            m_a = _(b"merging with a working directory ancestor has no effect")
             if pas == [p2]:
-                raise error.Abort(
-                    _(
-                        b"merging with a working directory ancestor"
-                        b" has no effect"
-                    )
-                )
+                raise error.Abort(m_a)
             elif pas == [p1]:
                 if not mergeancestor and wc.branch() == p2.branch():
                     raise error.Abort(