mercurial/treediscovery.py
changeset 49284 d44e3c45f0e4
parent 49017 f054a557aab8
child 49401 362c0026a977
equal deleted inserted replaced
49283:44b26349127b 49284:d44e3c45f0e4
    10 
    10 
    11 from .i18n import _
    11 from .i18n import _
    12 from .node import short
    12 from .node import short
    13 from . import (
    13 from . import (
    14     error,
    14     error,
    15     pycompat,
       
    16 )
    15 )
    17 
    16 
    18 
    17 
    19 def findcommonincoming(repo, remote, heads=None, force=False, audit=None):
    18 def findcommonincoming(repo, remote, heads=None, force=False, audit=None):
    20     """Return a tuple (common, fetch, heads) used to identify the common
    19     """Return a tuple (common, fetch, heads) used to identify the common
   114             reqcnt += 1
   113             reqcnt += 1
   115             progress.increment()
   114             progress.increment()
   116             repo.ui.debug(
   115             repo.ui.debug(
   117                 b"request %d: %s\n" % (reqcnt, b" ".join(map(short, r)))
   116                 b"request %d: %s\n" % (reqcnt, b" ".join(map(short, r)))
   118             )
   117             )
   119             for p in pycompat.xrange(0, len(r), 10):
   118             for p in range(0, len(r), 10):
   120                 with remote.commandexecutor() as e:
   119                 with remote.commandexecutor() as e:
   121                     subset = r[p : p + 10]
   120                     subset = r[p : p + 10]
   122                     if audit is not None:
   121                     if audit is not None:
   123                         audit[b'total-queries'] += len(subset)
   122                         audit[b'total-queries'] += len(subset)
   124                     branches = e.callcommand(
   123                     branches = e.callcommand(