# HG changeset patch # User Pierre-Yves David # Date 1610754873 -3600 # Node ID 9689d3f3f8c5475cfd6e4122aad19d4cb899ef74 # Parent f17b6e40a77588ec12695dd1b33cb64ec2fc581d discovery: move some debug output closer to were it belong I assume these debug output, increment and comment drifted over time. Differential Revision: https://phab.mercurial-scm.org/D9800 diff -r f17b6e40a775 -r 9689d3f3f8c5 mercurial/setdiscovery.py --- a/mercurial/setdiscovery.py Sat Jan 16 00:48:11 2021 +0100 +++ b/mercurial/setdiscovery.py Sat Jan 16 00:54:33 2021 +0100 @@ -314,9 +314,6 @@ else: ownheads = [rev for rev in cl.headrevs() if rev != nullrev] - # early exit if we know all the specified remote heads already - ui.debug(b"query 1; heads\n") - roundtrips += 1 # We also ask remote about all the local heads. That set can be arbitrarily # large, so we used to limit it size to `initialsamplesize`. We no longer # do as it proved counter productive. The skipped heads could lead to a @@ -375,6 +372,8 @@ else: sample = ownheads + ui.debug(b"query 1; heads\n") + roundtrips += 1 with remote.commandexecutor() as e: fheads = e.callcommand(b'heads', {}) fknown = e.callcommand( @@ -409,6 +408,7 @@ except error.LookupError: continue + # early exit if we know all the specified remote heads already if len(knownsrvheads) == len(srvheadhashes): ui.debug(b"all remote heads known locally\n") return srvheadhashes, False, srvheadhashes