Mercurial > public > mercurial-scm > hg-stable
diff mercurial/discovery.py @ 21198:56a04085c23c stable
discovery: don't report all "unsynced" remote heads (issue4230)
8a9e0b523d2d made discovery more helpful - too helpful for some extreme use
cases.
Instead, we arbitrarily limit the list it at 4 and add 'or more'.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Thu, 24 Apr 2014 16:47:22 +0200 |
parents | 7648e9aef6ee |
children | 32601b0b74c0 |
line wrap: on
line diff
--- a/mercurial/discovery.py Wed Apr 23 13:51:35 2014 +0200 +++ b/mercurial/discovery.py Thu Apr 24 16:47:22 2014 +0200 @@ -313,7 +313,11 @@ newhs = candidate_newhs unsynced = sorted(h for h in unsyncedheads if h not in discardedheads) if unsynced: - heads = ' '.join(short(h) for h in unsynced) + if len(unsynced) <= 4 or repo.ui.verbose: + heads = ' '.join(short(h) for h in unsynced) + else: + heads = (' '.join(short(h) for h in unsynced[:4]) + + ' ' + _("and %s others") % (len(unsynced) - 4)) if branch is None: repo.ui.status(_("remote has heads that are " "not known locally: %s\n") % heads)