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

marmoute (Pierre-Yves David) phabricator at mercurial-scm.org
Sat Jan 29 14:13:33 UTC 2022


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/D12102

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
@@ -336,10 +336,9 @@
     for f in pmmf:
         fold = util.normcase(f)
         if fold in foldmap:
-            raise error.StateError(
-                _(b"case-folding collision between %s and %s")
-                % (f, foldmap[fold])
-            )
+            msg = _(b"case-folding collision between %s and %s")
+            msg %= (f, foldmap[fold])
+            raise error.StateError(msg)
         foldmap[fold] = f
 
     # check case-folding of directories



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


More information about the Mercurial-devel mailing list