[PATCH FOLLOW UP] nodesummaries: improve format pattern used

Boris Feld boris.feld at octobus.net
Mon Dec 4 10:43:58 UTC 2017


# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1512376777 -3600
#      Mon Dec 04 09:39:37 2017 +0100
# Node ID c442effb81084ab881b807033a671b6cb5396b40
# Parent  aef2b98d935292bc5abf1d91751f7675e3176ffa
# EXP-Topic small-fixup
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r c442effb8108
nodesummaries: improve format pattern used

As spotted by Yuya Nishihara, that value is an integer.

diff --git a/mercurial/scmutil.py b/mercurial/scmutil.py
--- a/mercurial/scmutil.py
+++ b/mercurial/scmutil.py
@@ -1284,7 +1284,7 @@ def nodesummaries(repo, nodes, maxnumnod
     if len(nodes) <= maxnumnodes or repo.ui.verbose:
         return ' '.join(short(h) for h in nodes)
     first = ' '.join(short(h) for h in nodes[:maxnumnodes])
-    return _("%s and %s others") % (first, len(nodes) - maxnumnodes)
+    return _("%s and %d others") % (first, len(nodes) - maxnumnodes)
 
 def enforcesinglehead(repo, tr, desc):
     """check that no named branch has multiple heads"""


More information about the Mercurial-devel mailing list