diff mercurial/commands.py @ 20930:4a987060d97e

localrepo: move the getbundle method in changegroup module This is a gratuitous code move aimed at reducing the localrepo bloatness. The method had few callers, not enough to be kept in local repo. The peer API remains unchanged.
author Pierre-Yves David <pierre-yves.david@fb.com>
date Tue, 01 Apr 2014 14:40:35 -0700
parents 91b47139d0cb
children d3775db748a0
line wrap: on
line diff
--- a/mercurial/commands.py	Thu Apr 03 12:59:12 2014 -0500
+++ b/mercurial/commands.py	Tue Apr 01 14:40:35 2014 -0700
@@ -1129,8 +1129,8 @@
                                "a destination"))
         common = [repo.lookup(rev) for rev in base]
         heads = revs and map(repo.lookup, revs) or revs
-        cg = repo.getbundle('bundle', heads=heads, common=common,
-                            bundlecaps=bundlecaps)
+        cg = changegroup.getbundle(repo, 'bundle', heads=heads, common=common,
+                                   bundlecaps=bundlecaps)
         outgoing = None
     else:
         dest = ui.expandpath(dest or 'default-push', dest or 'default')