changeset 48707:48aff31e7f4c

merge: break up a not-so-one-liner for readability Differential Revision: https://phab.mercurial-scm.org/D12110
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 28 Jan 2022 14:25:51 +0100
parents 00bfd920169d
children 25d5dffbb211
files mercurial/merge.py
diffstat 1 files changed, 2 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Fri Jan 28 14:25:45 2022 +0100
+++ b/mercurial/merge.py	Fri Jan 28 14:25:51 2022 +0100
@@ -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(),