[PATCH 06 of 10 V2] discovery: update undecided from common directly within partialdiscovery
Boris Feld
boris.feld at octobus.net
Fri Jan 4 17:29:27 UTC 2019
# HG changeset patch
# User Boris Feld <boris.feld at octobus.net>
# Date 1545964463 -3600
# Fri Dec 28 03:34:23 2018 +0100
# Node ID 239193146a8378d7567e566bb00764415be709ae
# Parent fca60f8ccc4333b0afd959e45a0febb64126ec7f
# EXP-Topic discovery-refactor
# Available At https://bitbucket.org/octobus/mercurial-devel/
# hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 239193146a83
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"""
@@ -321,7 +322,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