/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: Martin Pool
  • Date: 2006-10-06 02:04:17 UTC
  • mfrom: (1908.10.1 bench_usecases.merge2)
  • mto: This revision was merged to the branch mainline in revision 2068.
  • Revision ID: mbp@sourcefrog.net-20061006020417-4949ca86f4417a4d
merge additional fix from cfbolz

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
# e.g. "3:12 Tue", "13 Oct", "Oct 2005", etc.  
27
27
 
28
28
import sys
29
 
import os
30
29
import time
31
30
 
32
 
import bzrlib.weave
33
31
from bzrlib.config import extract_email_address
34
32
from bzrlib.errors import BzrError
35
33
 
41
39
 
42
40
    prevanno=''
43
41
    annotation = list(_annotate_file(branch, rev_id, file_id))
44
 
    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))
45
46
    for (revno_str, author, date_str, line_rev_id, text ) in annotation:
46
47
        if verbose:
47
48
            anno = '%5s %-*s %8s ' % (revno_str, max_origin_len, author, date_str)