changeset 26462:3b0ec09192ae

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.
author Gregory Szorc <gregory.szorc@gmail.com>
date Sun, 04 Oct 2015 11:34:28 -0700
parents 09cc3c2e9ece
children b3188339a772
files mercurial/exchange.py mercurial/streamclone.py
diffstat 2 files changed, 10 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/exchange.py	Sun Oct 04 11:27:10 2015 -0700
+++ b/mercurial/exchange.py	Sun Oct 04 11:34:28 2015 -0700
@@ -964,7 +964,7 @@
     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)
--- a/mercurial/streamclone.py	Sun Oct 04 11:27:10 2015 -0700
+++ b/mercurial/streamclone.py	Sun Oct 04 11:34:28 2015 -0700
@@ -66,7 +66,15 @@
 
     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