checkheads: drop now unused filtering of 'unsyncedheads'
authorPierre-Yves David <pierre-yves.david@octobus.net>
Mon, 29 May 2017 05:21:38 +0200
changeset 32674 7a7c4f3afb98
parent 32673 bd966b9f3274
child 32675 fc9296c15112
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.
mercurial/discovery.py
--- 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"))