~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to branches.py

  • Committer: Aaron Bentley
  • Date: 2006-03-24 16:22:11 UTC
  • Revision ID: abentley@panoramicfeedback.com-20060324162211-587ea2d2e6386e63
Added branches subcommand

Show diffs side-by-side

added added

removed removed

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