# HG changeset patch # User Boris Feld # Date 2018-12-28 02:34:23 # 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 --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py --- a/mercurial/setdiscovery.py +++ b/mercurial/setdiscovery.py @@ -180,6 +180,7 @@ class partialdiscovery(object): 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 @@ def findcommonheads(ui, local, remote, 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