merge: break up a not-so-one-liner for readability
authorPierre-Yves David <pierre-yves.david@octobus.net>
Fri, 28 Jan 2022 14:25:39 +0100
changeset 48719 bca57b01518f
parent 48718 58a2c66fa94c
child 48720 00bfd920169d
merge: break up a not-so-one-liner for readability Differential Revision: https://phab.mercurial-scm.org/D12108
mercurial/merge.py
--- a/mercurial/merge.py	Fri Jan 28 14:25:32 2022 +0100
+++ b/mercurial/merge.py	Fri Jan 28 14:25:39 2022 +0100
@@ -1927,10 +1927,9 @@
                 raise error.Abort(m_a)
             elif pas == [p1]:
                 if not mergeancestor and wc.branch() == p2.branch():
-                    raise error.Abort(
-                        _(b"nothing to merge"),
-                        hint=_(b"use 'hg update' or check 'hg heads'"),
-                    )
+                    msg = _(b"nothing to merge")
+                    hint = _(b"use 'hg update' or check 'hg heads'")
+                    raise error.Abort(msg, hint=hint)
             if not force and (wc.files() or wc.deleted()):
                 raise error.StateError(
                     _(b"uncommitted changes"),