[Updated] D12109: merge: break up a not-so-one-liner for readability

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Fri Feb 4 10:29:52 UTC 2022


Closed by commit rHG00bfd920169d: merge: break up a not-so-one-liner for readability (authored by marmoute).
This revision was automatically updated to reflect the committed changes.

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D12109?vs=32005&id=32067

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D12109/new/

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

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



To: marmoute, #hg-reviewers, Alphare
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220204/e691e4f1/attachment-0002.html>


More information about the Mercurial-patches mailing list