mercurial/treediscovery.py
changeset 46110 d90f439ff19f
parent 45942 89a2afe31e82
child 46819 d4ba4d51f85f
--- a/mercurial/treediscovery.py	Fri Dec 11 13:39:56 2020 -0800
+++ b/mercurial/treediscovery.py	Fri Dec 11 12:51:09 2020 +0100
@@ -20,7 +20,7 @@
 )
 
 
-def findcommonincoming(repo, remote, heads=None, force=False):
+def findcommonincoming(repo, remote, heads=None, force=False, audit=None):
     """Return a tuple (common, fetch, heads) used to identify the common
     subset of nodes between repo and remote.
 
@@ -41,6 +41,9 @@
         with remote.commandexecutor() as e:
             heads = e.callcommand(b'heads', {}).result()
 
+    if audit is not None:
+        audit[b'total-roundtrips'] = 1
+
     if repo.changelog.tip() == nullid:
         base.add(nullid)
         if heads != [nullid]:
@@ -181,5 +184,7 @@
 
     progress.complete()
     repo.ui.debug(b"%d total queries\n" % reqcnt)
+    if audit is not None:
+        audit[b'total-roundtrips'] = reqcnt
 
     return base, list(fetch), heads