Show More
@@ -21,6 +21,7 b' from . import (' | |||||
21 | branchmap, |
|
21 | branchmap, | |
22 | error, |
|
22 | error, | |
23 | phases, |
|
23 | phases, | |
|
24 | scmutil, | |||
24 | setdiscovery, |
|
25 | setdiscovery, | |
25 | treediscovery, |
|
26 | treediscovery, | |
26 | util, |
|
27 | util, | |
@@ -365,11 +366,8 b' def checkheads(pushop):' | |||||
365 | if None in unsyncedheads: |
|
366 | if None in unsyncedheads: | |
366 | # old remote, no heads data |
|
367 | # old remote, no heads data | |
367 | heads = None |
|
368 | heads = None | |
368 | elif len(unsyncedheads) <= 4 or repo.ui.verbose: |
|
|||
369 | heads = ' '.join(short(h) for h in unsyncedheads) |
|
|||
370 | else: |
|
369 | else: | |
371 | heads = (' '.join(short(h) for h in unsyncedheads[:4]) + |
|
370 | heads = scmutil.nodesummaries(repo, unsyncedheads) | |
372 | ' ' + _("and %s others") % (len(unsyncedheads) - 4)) |
|
|||
373 | if heads is None: |
|
371 | if heads is None: | |
374 | repo.ui.status(_("remote has heads that are " |
|
372 | repo.ui.status(_("remote has heads that are " | |
375 | "not known locally\n")) |
|
373 | "not known locally\n")) |
@@ -1280,6 +1280,12 b' def registersummarycallback(repo, otr, t' | |||||
1280 | revrange = '%s:%s' % (minrev, maxrev) |
|
1280 | revrange = '%s:%s' % (minrev, maxrev) | |
1281 | repo.ui.status(_('new changesets %s\n') % revrange) |
|
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 | def wrapconvertsink(sink): |
|
1289 | def wrapconvertsink(sink): | |
1284 | """Allow extensions to wrap the sink returned by convcmd.convertsink() |
|
1290 | """Allow extensions to wrap the sink returned by convcmd.convertsink() | |
1285 | before it is used, whether or not the convert extension was formally loaded. |
|
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