~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: John Arbash Meinel
  • Date: 2006-12-13 23:16:35 UTC
  • mto: This revision was merged to the branch mainline in revision 2186.
  • Revision ID: john@arbash-meinel.com-20061213231635-oj9fug4280btkjuh
Some cleanup to make annotate.py < 79 chars wide.

Show diffs side-by-side

added added

removed removed

Lines of Context:
45
45
    if len(annotation) == 0:
46
46
        max_origin_len = max_revno_len = max_revid_len = 0
47
47
    else:
48
 
        max_origin_len = max(len(origin) for origin in set(x[1] for x in annotation))
 
48
        max_origin_len = max(len(x[1]) for x in annotation)
49
49
        max_revno_len = max(len(x[0]) for x in annotation)
50
50
        max_revid_len = max(len(x[3]) for x in annotation)
51
51
 
63
63
            last_rev_id = line_rev_id
64
64
        else:
65
65
            if verbose:
66
 
                anno = '%-*s %-*s %8s ' % (max_revno_len, revno_str, max_origin_len, author, date_str)
 
66
                anno = '%-*s %-*s %8s ' % (max_revno_len, revno_str,
 
67
                                           max_origin_len, author, date_str)
67
68
            else:
68
69
                if len(revno_str) > max_revno_len:
69
70
                    revno_str = revno_str[:max_revno_len-1] + '>'
70
 
                anno = "%-*s %-7s " % (max_revno_len, revno_str, author[:7] )
 
71
                anno = "%-*s %-7s " % (max_revno_len, revno_str, author[:7])
71
72
 
72
73
        if anno.lstrip() == "" and full: anno = prevanno
73
74
        print >>to_file, '%s| %s' % (anno, text)
107
108
                                            revision_id_to_revno[origin])
108
109
            rev = revisions[origin]
109
110
            tz = rev.timezone or 0
110
 
            date_str = time.strftime('%Y%m%d', 
 
111
            date_str = time.strftime('%Y%m%d',
111
112
                                     time.gmtime(rev.timestamp + tz))
112
113
            # a lazy way to get something like the email address
113
114
            # TODO: Get real email address