~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to branchhistory.py

  • Committer: Aaron Bentley
  • Date: 2006-03-14 18:10:04 UTC
  • mto: This revision was merged to the branch mainline in revision 329.
  • Revision ID: abentley@panoramicfeedback.com-20060314181004-ea3edbc59ddc8ae3
Handle aliases in bzr shell

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
    b = Branch.open_containing(branch)[0]
7
7
    descriptor = None
8
8
    start = None
9
 
    b.repository.lock_read()
10
 
    try:
11
 
        for revno, revision in iter_revisiondata(b):
12
 
            new_descriptor = (revision.committer, 
13
 
                              revision.properties.get('branch-nick'))
14
 
            if descriptor is None:
15
 
                descriptor = new_descriptor
16
 
            if start is None:
17
 
                start = revno
18
 
            if branch_change(descriptor, new_descriptor):
19
 
                print_info(descriptor, start, revno - 1)
20
 
                start = revno
 
9
    for revno, revision in iter_revisiondata(b):
 
10
        new_descriptor = (revision.committer, 
 
11
                          revision.properties.get('branch-nick'))
 
12
        if descriptor is None:
21
13
            descriptor = new_descriptor
22
 
        print_info(descriptor, start, revno)
23
 
    finally:
24
 
        b.repository.unlock()
 
14
        if start is None:
 
15
            start = revno
 
16
        if branch_change(descriptor, new_descriptor):
 
17
            print_info(descriptor, start, revno - 1)
 
18
            start = revno
 
19
        descriptor = new_descriptor
 
20
    print_info(descriptor, start, revno)
25
21
 
26
22
def branch_change(old_descriptor, new_descriptor):
27
23
    if old_descriptor == new_descriptor: