# HG changeset patch # User Boris Feld # Date 1545964463 -3600 # Node ID 1d30be90c9dc79ae032f9331700058839d27a378 # Parent 870a89c6909d5c358d1dda404e1296498ae2dc4d 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. diff -r 870a89c6909d -r 1d30be90c9dc mercurial/setdiscovery.py --- 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