[Request] [+ ] D12107: merge: break up a not-so-one-liner for readability

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Jan 29 14:14:48 UTC 2022


marmoute created this revision.
Herald added a reviewer: hg-reviewers.
Herald added a subscriber: mercurial-patches.

REPOSITORY
  rHG Mercurial

BRANCH
  default

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

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
@@ -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(



To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mercurial-scm.org/pipermail/mercurial-patches/attachments/20220129/ab5d77bc/attachment.html>


More information about the Mercurial-patches mailing list