diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -11,6 +11,7 @@ import errno, urllib import util, scmutil, changegroup, base85, error import discovery, phases, obsolete, bookmarks as bookmod, bundle2, pushkey import lock as lockmod +import streamclone import tags def readbundle(ui, fh, fname, vfs=None): @@ -963,6 +964,9 @@ def pull(repo, remote, heads=None, force lock = pullop.repo.lock() try: pullop.trmanager = transactionmanager(repo, 'pull', remote.url()) + streamclone.maybeperformstreamclone(pullop.repo, pullop.remote, + pullop.heads, + pullop.streamclonerequested) _pulldiscovery(pullop) if _canusebundle2(pullop): _pullbundle2(pullop) diff --git a/mercurial/localrepo.py b/mercurial/localrepo.py --- a/mercurial/localrepo.py +++ b/mercurial/localrepo.py @@ -19,7 +19,6 @@ from lock import release import weakref, errno, os, time, inspect, random import branchmap, pathutil import namespaces -import streamclone propertycache = util.propertycache filecache = scmutil.filecache @@ -1794,8 +1793,6 @@ class localrepository(object): keyword arguments: heads: list of revs to clone (forces use of pull) stream: use streaming clone if possible''' - streamclone.maybeperformstreamclone(self, remote, heads, stream) - # internal config: ui.quietbookmarkmove quiet = self.ui.backupconfig('ui', 'quietbookmarkmove') try: