changeset 32671:81cbfaea1e0f

discovery: also use lists for the returns of '_oldheadssummary' The '_headssummary' function is documenting and using list objects in its return. We now use them in _oldheadssummary too for consistency. This does not affect any usages of these values.
author Pierre-Yves David <pierre-yves.david@octobus.net>
date Mon, 29 May 2017 05:37:19 +0200
parents 41b8cfe85383
children 315d74d0f059
files mercurial/discovery.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/discovery.py	Mon May 29 05:53:51 2017 +0200
+++ b/mercurial/discovery.py	Mon May 29 05:37:19 2017 +0200
@@ -244,7 +244,7 @@
     # Construct {old,new}map with branch = None (topological branch).
     # (code based on update)
     knownnode = repo.changelog.hasnode # no nodemap until it is filtered
-    oldheads = set(h for h in remoteheads if knownnode(h))
+    oldheads = list(h for h in remoteheads if knownnode(h))
     # all nodes in outgoing.missing are children of either:
     # - an element of oldheads
     # - another element of outgoing.missing
@@ -254,9 +254,9 @@
     newheads = list(c.node() for c in r)
     # set some unsynced head to issue the "unsynced changes" warning
     if inc:
-        unsynced = {None}
+        unsynced = [None]
     else:
-        unsynced = set()
+        unsynced = []
     return {None: (oldheads, newheads, unsynced)}
 
 def _nowarnheads(pushop):