~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to branches.py

  • Committer: Aaron Bentley
  • Date: 2013-08-20 03:02:43 UTC
  • Revision ID: aaron@aaronbentley.com-20130820030243-r8v1xfbcnd8f10p4
Fix zap command for 2.6/7

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
from bzrlib.transport import get_transport
2
 
from bzrtools import iter_branches, apache_ls
 
2
from bzrtools import list_branches
 
3
 
3
4
 
4
5
def branches(location=None):
5
6
    if location is None:
6
7
        location = '.'
7
8
    t = get_transport(location)
8
 
    if location.startswith('http://'):
9
 
        lister = apache_ls
10
 
    elif not t.listable():
11
 
        print "Can't list this type of location."
12
 
        return 3
13
 
    else:
14
 
        lister = None
15
 
    for branch in iter_branches(t, lister):
 
9
    for branch in list_branches(t):
16
10
        print branch.base[len(t.base):].rstrip('/')