changeset 48700:d8577d00c023

merge: break up a not-so-one-liner for readability Differential Revision: https://phab.mercurial-scm.org/D12103
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Fri, 28 Jan 2022 14:23:56 +0100
parents 10407e8e3807
children 85c69b0dfa8f
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:23:49 2022 +0100
+++ b/mercurial/merge.py	Fri Jan 28 14:23:56 2022 +0100
@@ -346,10 +346,9 @@
     for fold, f in sorted(foldmap.items()):
         if fold.startswith(foldprefix) and not f.startswith(unfoldprefix):
             # the folded prefix matches but actual casing is different
-            raise error.StateError(
-                _(b"case-folding collision between %s and directory of %s")
-                % (lastfull, f)
-            )
+            msg = _(b"case-folding collision between %s and directory of %s")
+            msg %= (lastfull, f)
+            raise error.StateError(msg)
         foldprefix = fold + b'/'
         unfoldprefix = f + b'/'
         lastfull = f