##// END OF EJS Templates
scmutil: extra utility to display a reasonable amount of nodes...
Boris Feld -
r35185:bc775b8c default
parent child Browse files
Show More
@@ -21,6 +21,7 b' from . import ('
21 21 branchmap,
22 22 error,
23 23 phases,
24 scmutil,
24 25 setdiscovery,
25 26 treediscovery,
26 27 util,
@@ -365,11 +366,8 b' def checkheads(pushop):'
365 366 if None in unsyncedheads:
366 367 # old remote, no heads data
367 368 heads = None
368 elif len(unsyncedheads) <= 4 or repo.ui.verbose:
369 heads = ' '.join(short(h) for h in unsyncedheads)
370 369 else:
371 heads = (' '.join(short(h) for h in unsyncedheads[:4]) +
372 ' ' + _("and %s others") % (len(unsyncedheads) - 4))
370 heads = scmutil.nodesummaries(repo, unsyncedheads)
373 371 if heads is None:
374 372 repo.ui.status(_("remote has heads that are "
375 373 "not known locally\n"))
@@ -1280,6 +1280,12 b' def registersummarycallback(repo, otr, t'
1280 1280 revrange = '%s:%s' % (minrev, maxrev)
1281 1281 repo.ui.status(_('new changesets %s\n') % revrange)
1282 1282
1283 def nodesummaries(repo, nodes, maxnumnodes=4):
1284 if len(nodes) <= maxnumnodes or repo.ui.verbose:
1285 return ' '.join(short(h) for h in nodes)
1286 first = ' '.join(short(h) for h in nodes[:maxnumnodes])
1287 return _("%s and %s others") % (first, len(nodes) - maxnumnodes)
1288
1283 1289 def wrapconvertsink(sink):
1284 1290 """Allow extensions to wrap the sink returned by convcmd.convertsink()
1285 1291 before it is used, whether or not the convert extension was formally loaded.
General Comments 0
You need to be logged in to leave comments. Login now