setdiscovery: drop shadowed 'undecided' assignment
authorPierre-Yves David <pierre-yves.david@fb.com>
Tue, 06 Jan 2015 16:30:37 -0800
changeset 23746 4ef2f2fa8b8b27daf21375017f5646b3277d35cc
parent 23745 513d4790511400f3870c9e8d312da71b09b1c14d
child 23747 f82173a90c2c9d0d32216fe7243ec51fc6d44ff7
push id1
push usergszorc@mozilla.com
push dateWed, 18 Mar 2015 16:34:57 +0000
setdiscovery: drop shadowed 'undecided' assignment The 'undecided' variable was never used before being overwritten a few lines later.
mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py
+++ b/mercurial/setdiscovery.py
@@ -169,24 +169,23 @@ def findcommonheads(ui, local, remote,
 
     if sample and len(ownheads) <= initialsamplesize and util.all(yesno):
         ui.note(_("all local heads known remotely\n"))
         ownheadhashes = dag.externalizeall(ownheads)
         return (ownheadhashes, True, srvheadhashes,)
 
     # full blown discovery
 
-    # own nodes where I don't know if remote knows them
-    undecided = dag.nodeset()
     # own nodes I know we both know
     # treat remote heads (and maybe own heads) as a first implicit sample
     # response
     common = cl.incrementalmissingrevs(srvheads)
     commoninsample = set(n for i, n in enumerate(sample) if yesno[i])
     common.addbases(commoninsample)
+    # own nodes where I don't know if remote knows them
     undecided = set(common.missingancestors(ownheads))
     # own nodes I know remote lacks
     missing = set()
 
     full = False
     while undecided:
 
         if sample: