# HG changeset patch # User Gregory Szorc # Date 2015-10-04 18:34:28 # Node ID 3b0ec09192ae4bf54c56d605b1395d9f7068b904 # Parent 09cc3c2e9ece94b97442d4cbf08f8bbaf1e8ed2d streamclone: rename and document maybeperformstreamclone() Upcoming patches will introduce bundle2 based streaming clones. Add "legacy" to the function name and add a docstring clarifying the intent of the function. diff --git a/mercurial/exchange.py b/mercurial/exchange.py --- a/mercurial/exchange.py +++ b/mercurial/exchange.py @@ -964,7 +964,7 @@ def pull(repo, remote, heads=None, force lock = pullop.repo.lock() try: pullop.trmanager = transactionmanager(repo, 'pull', remote.url()) - streamclone.maybeperformstreamclone(pullop) + streamclone.maybeperformlegacystreamclone(pullop) _pulldiscovery(pullop) if _canusebundle2(pullop): _pullbundle2(pullop) diff --git a/mercurial/streamclone.py b/mercurial/streamclone.py --- a/mercurial/streamclone.py +++ b/mercurial/streamclone.py @@ -66,7 +66,15 @@ def canperformstreamclone(repo, remote, return True, requirements -def maybeperformstreamclone(pullop): +def maybeperformlegacystreamclone(pullop): + """Possibly perform a legacy stream clone operation. + + Legacy stream clones are performed as part of pull but before all other + operations. + + A legacy stream clone will not be performed if a bundle2 stream clone is + supported. + """ repo = pullop.repo remote = pullop.remote