[PATCH 1 of 2] setdiscovery: drop shadowed 'undecided' assignment

Pierre-Yves David pierre-yves.david at ens-lyon.org
Wed Jan 7 07:56:01 UTC 2015


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at fb.com>
# Date 1420590637 28800
#      Tue Jan 06 16:30:37 2015 -0800
# Node ID 0eb961b8ee3cf1c35d6314d05290baa220546394
# Parent  d944492445fa0d0b9c164336afab68127080a1f3
setdiscovery: drop shadowed 'undecided' assignment

The 'undecided' variable was never used before being overwritten a few lines
later.

diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py
+++ b/mercurial/setdiscovery.py
@@ -172,18 +172,17 @@ def findcommonheads(ui, local, remote,
         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


More information about the Mercurial-devel mailing list