discovery: update undecided from common directly within partialdiscovery
The object knows when there are changes in the "common" set, so it is a good
place to update the undecided set.
--- a/mercurial/setdiscovery.py Fri Dec 28 03:23:37 2018 +0100
+++ b/mercurial/setdiscovery.py Fri Dec 28 03:34:23 2018 +0100
@@ -180,6 +180,7 @@
def addcommons(self, commons):
"""registrer nodes known as common"""
self._common.addbases(commons)
+ self._common.removeancestorsfrom(self.undecided)
def hasinfo(self):
"""return True is we have any clue about the remote state"""
@@ -324,7 +325,6 @@
if sample:
commoninsample = set(n for i, n in enumerate(sample) if yesno[i])
disco.addcommons(commoninsample)
- disco._common.removeancestorsfrom(disco.undecided)
result = disco.commonheads()
elapsed = util.timer() - start