306
306
from branches import branches
307
307
return branches(location)
310
class cmd_multi_pull(bzrlib.commands.Command):
311
"""Pull all the branches under a location, e.g. a repository. <BZRTOOLS>
313
Both branches present in the directory and the branches of checkouts are
316
takes_args = ["location?"]
317
def run(self, location=None):
318
from bzrlib.branch import Branch
319
from bzrlib.transport import get_transport
320
from bzrtools import iter_branch_tree
323
t = get_transport(location)
325
print "Can't list this type of location."
327
for branch, wt in iter_branch_tree(t):
332
parent = branch.get_parent()
339
if base.startswith(t.base):
340
relpath = base[len(t.base):].rstrip('/')
343
print "Pulling %s from %s" % (relpath, parent)
345
pullable.pull(Branch.open(parent))
309
350
commands = [cmd_shelve, cmd_unshelve, cmd_shelf, cmd_clean_tree,
310
351
cmd_graph_ancestry, cmd_fetch_ghosts, cmd_patch, cmd_shell,
311
cmd_branch_history, cmd_zap, cmd_cbranch, cmd_branches]
352
cmd_branch_history, cmd_zap, cmd_cbranch, cmd_branches,
314
356
command_decorators = []