changeset 41168:1d30be90c9dc

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.
author Boris Feld <boris.feld@octobus.net>
date Fri, 28 Dec 2018 03:34:23 +0100
parents 870a89c6909d
children 3ce5b96482c6
files mercurial/setdiscovery.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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