mercurial/changegroup.py
changeset 20928 91b47139d0cb
parent 20927 24a443948627
child 20930 4a987060d97e
--- a/mercurial/changegroup.py	Tue Apr 01 14:25:03 2014 -0700
+++ b/mercurial/changegroup.py	Tue Apr 01 14:33:23 2014 -0700
@@ -480,3 +480,13 @@
     bundler = bundle10(repo)
     return getsubset(repo, outgoing, bundler, source)
 
+def getlocalbundle(repo, source, outgoing, bundlecaps=None):
+    """Like getbundle, but taking a discovery.outgoing as an argument.
+
+    This is only implemented for local repos and reuses potentially
+    precomputed sets in outgoing."""
+    if not outgoing.missing:
+        return None
+    bundler = bundle10(repo, bundlecaps)
+    return getsubset(repo, outgoing, bundler, source)
+