/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-09-22 22:59:59 UTC
  • mfrom: (2027.3.2 annotate-empty-56814)
  • Revision ID: pqm@pqm.ubuntu.com-20060922225959-7d4c092a9310fe6a
(jam) fix bug #56814, don't fail when annotating an empty file

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
    prevanno=''
41
41
    annotation = list(_annotate_file(branch, rev_id, file_id))
42
 
    max_origin_len = max(len(origin) for origin in set(x[1] for x in annotation))
 
42
    if len(annotation) == 0:
 
43
        max_origin_len = 0
 
44
    else:
 
45
        max_origin_len = max(len(origin) for origin in set(x[1] for x in annotation))
43
46
    for (revno_str, author, date_str, line_rev_id, text ) in annotation:
44
47
        if verbose:
45
48
            anno = '%5s %-*s %8s ' % (revno_str, max_origin_len, author, date_str)