[PATCH 5 of 8] discovery: update undecided from common directly within partialdiscovery
Boris Feld
boris.feld at octobus.net
Mon Dec 31 12:35:52 EST 2018
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1545964463 -3600
# Fri Dec 28 03:34:23 2018 +0100
# Node ID 53455b1ab93ea86f6c7ad1b57716f44753447ab4
# Parent 6eb53e3f1bc514d4cb376d84b2bdd1302d27f8e2
# EXP-Topic discovery-refactor
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 53455b1ab93e
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
@@ -181,6 +181,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"""
@@ -322,7 +323,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)
# heads(common) == heads(common.bases) since common represents common.bases
# and all its ancestors
More information about the Mercurial-devel
mailing list