~abentley/bzrtools/bzrtools.dev

602 by Aaron Bentley
Update branches to new find_branches API
1
from bzrlib import errors
2
from bzrlib.bzrdir import BzrDir
352 by Aaron Bentley
Added branches subcommand
3
from bzrlib.transport import get_transport
603 by Aaron Bentley
Update branches, multi-pull to new APIs, create trees
4
from bzrtools import list_branches
602 by Aaron Bentley
Update branches to new find_branches API
5
352 by Aaron Bentley
Added branches subcommand
6
7
def branches(location=None):
8
    if location is None:
9
        location = '.'
10
    t = get_transport(location)
602 by Aaron Bentley
Update branches to new find_branches API
11
    for branch in list_branches(t):
352 by Aaron Bentley
Added branches subcommand
12
        print branch.base[len(t.base):].rstrip('/')