~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: Robert Collins
  • Date: 2005-11-28 05:13:41 UTC
  • mfrom: (1185.33.54 merge-recovered)
  • Revision ID: robertc@robertcollins.net-20051128051341-059936f2f29a12c8
Merge from Martin. Adjust check to work with HTTP again.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
# TODO: Show which revision caused a line to merge into the parent
24
24
 
25
 
# TODO: With --long, show entire email address, not just the first bit
26
 
 
27
25
# TODO: perhaps abbreviate timescales depending on how recent they are
28
26
# e.g. "3:12 Tue", "13 Oct", "Oct 2005", etc.  
29
27
 
42
40
        to_file = sys.stdout
43
41
 
44
42
    prevanno=''
45
 
    for (revno_str, author, date_str, line_rev_id, text ) in \
46
 
            _annotate_file(branch, rev_id, file_id ):
47
 
 
 
43
    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))
 
45
    for (revno_str, author, date_str, line_rev_id, text ) in annotation:
48
46
        if verbose:
49
 
            anno = '%5s %-12s %8s ' % (revno_str, author[:12], date_str)
 
47
            anno = '%5s %-*s %8s ' % (revno_str, max_origin_len, author, date_str)
50
48
        else:
51
49
            anno = "%5s %-7s " % ( revno_str, author[:7] )
52
50