comparison mercurial/scmutil.py @ 35206:278f1feee73a

scmutil: improve format pattern used in nodesummaries As spotted by Yuya Nishihara, that value is an integer.
author Boris Feld <boris.feld@octobus.net>
date Mon, 04 Dec 2017 09:39:37 +0100
parents 66ecde8a704d
children 137a08d82232
comparison
equal deleted inserted replaced
35205:8feef8ef8389 35206:278f1feee73a
1282 1282
1283 def nodesummaries(repo, nodes, maxnumnodes=4): 1283 def nodesummaries(repo, nodes, maxnumnodes=4):
1284 if len(nodes) <= maxnumnodes or repo.ui.verbose: 1284 if len(nodes) <= maxnumnodes or repo.ui.verbose:
1285 return ' '.join(short(h) for h in nodes) 1285 return ' '.join(short(h) for h in nodes)
1286 first = ' '.join(short(h) for h in nodes[:maxnumnodes]) 1286 first = ' '.join(short(h) for h in nodes[:maxnumnodes])
1287 return _("%s and %s others") % (first, len(nodes) - maxnumnodes) 1287 return _("%s and %d others") % (first, len(nodes) - maxnumnodes)
1288 1288
1289 def enforcesinglehead(repo, tr, desc): 1289 def enforcesinglehead(repo, tr, desc):
1290 """check that no named branch has multiple heads""" 1290 """check that no named branch has multiple heads"""
1291 if desc in ('strip', 'repair'): 1291 if desc in ('strip', 'repair'):
1292 # skip the logic during strip 1292 # skip the logic during strip