~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: John Arbash Meinel
  • Date: 2006-09-23 06:39:46 UTC
  • mfrom: (2034 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2035.
  • Revision ID: john@arbash-meinel.com-20060923063946-e596c8a8eef928b4
[merge] bzr.dev 2034

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)