changeset 48706:00bfd920169d

merge: break up a not-so-one-liner for readability Differential Revision: https://phab.mercurial-scm.org/D12109
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 28 Jan 2022 14:25:45 +0100
parents bca57b01518f
children 48aff31e7f4c
files mercurial/merge.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/merge.py	Fri Jan 28 14:25:39 2022 +0100
+++ b/mercurial/merge.py	Fri Jan 28 14:25:45 2022 +0100
@@ -1931,10 +1931,9 @@
                     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"),
-                    hint=_(b"use 'hg status' to list changes"),
-                )
+                msg = _(b"uncommitted changes")
+                hint = _(b"use 'hg status' to list changes")
+                raise error.StateError(msg, hint=hint)
             if not wc.isinmemory():
                 for s in sorted(wc.substate):
                     wc.sub(s).bailifchanged()