changeset 32694:7a7c4f3afb98

checkheads: drop now unused filtering of 'unsyncedheads' Now that unsynced heads are no longer in the function inputs or returns, we can simplify the code a bit.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 29 May 2017 05:21:38 +0200
parents bd966b9f3274
children fc9296c15112
files mercurial/discovery.py
diffstat 1 files changed, 6 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/discovery.py	Mon May 29 05:20:09 2017 +0200
+++ b/mercurial/discovery.py	Mon May 29 05:21:38 2017 +0200
@@ -355,16 +355,15 @@
                                                          allfuturecommon,
                                                          newheads)
         newhs.update(unsyncedheads)
-        unsynced = sorted(h for h in unsyncedheads if h not in discardedheads)
-        if unsynced:
-            if None in unsynced:
+        if unsyncedheads:
+            if None in unsyncedheads:
                 # old remote, no heads data
                 heads = None
-            elif len(unsynced) <= 4 or repo.ui.verbose:
-                heads = ' '.join(short(h) for h in unsynced)
+            elif len(unsyncedheads) <= 4 or repo.ui.verbose:
+                heads = ' '.join(short(h) for h in unsyncedheads)
             else:
-                heads = (' '.join(short(h) for h in unsynced[:4]) +
-                         ' ' + _("and %s others") % (len(unsynced) - 4))
+                heads = (' '.join(short(h) for h in unsyncedheads[:4]) +
+                         ' ' + _("and %s others") % (len(unsyncedheads) - 4))
             if heads is None:
                 repo.ui.status(_("remote has heads that are "
                                  "not known locally\n"))