Patchwork D12110: merge: break up a not-so-one-liner for readability

login
register
mail settings
Submitter phabricator
Date Jan. 29, 2022, 2:15 p.m.
Message ID <differential-rev-PHID-DREV-rro3ylbsmcmzku3d5ytx-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/50436/
State New
Headers show

Comments

phabricator - Jan. 29, 2022, 2:15 p.m.
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/D12110

AFFECTED FILES
  mercurial/merge.py

CHANGE DETAILS




To: marmoute, #hg-reviewers
Cc: mercurial-patches, mercurial-devel

Patch

diff --git a/mercurial/merge.py b/mercurial/merge.py
--- a/mercurial/merge.py
+++ b/mercurial/merge.py
@@ -2368,9 +2368,8 @@ 
 def back_out(ctx, parent=None, wc=None):
     if parent is None:
         if ctx.p2() is not None:
-            raise error.ProgrammingError(
-                b"must specify parent of merge commit to back out"
-            )
+            msg = b"must specify parent of merge commit to back out"
+            raise error.ProgrammingError(msg)
         parent = ctx.p1()
     return _update(
         ctx.repo(),