# HG changeset patch # User Pierre-Yves David # Date 2022-01-28 13:25:45 # Node ID 00bfd920169dbbf97e851f1391ec8687bbfe2b6f # Parent bca57b01518fdac7bd8f4f18dfa26cee8c7f2885 merge: break up a not-so-one-liner for readability Differential Revision: https://phab.mercurial-scm.org/D12109 diff --git a/mercurial/merge.py b/mercurial/merge.py --- a/mercurial/merge.py +++ b/mercurial/merge.py @@ -1931,10 +1931,9 @@ def _update( 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()