/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

Add WSGI smart server.

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)