39
39
for origin, text in w.annotate_iter(rev_id):
40
40
text = text.rstrip('\r\n')
41
41
if origin == last_origin:
42
print ' | %s' % (text)
44
44
last_origin = origin
45
45
line_rev_id = w.idx_to_name(origin)
47
revno = rh.index(line_rev_id) + 1
48
print '%8d | %s' % (revno, text)
49
elif branch.has_revision(line_rev_id):
50
rev = branch.get_revision(line_rev_id)
51
date_str = time.strftime('%Y%m%d', time.gmtime(rev.timestamp + rev.timezone))
52
print '%8s | %s' % (date_str, text)
46
if not branch.has_revision(line_rev_id):
54
print '%8.8s | %s' % (line_rev_id, text)
50
revno_str = str(rh.index(line_rev_id) + 1)
53
rev = branch.get_revision(line_rev_id)
54
tz = rev.timezone or 0
55
date_str = time.strftime('%Y%m%d',
56
time.gmtime(rev.timestamp + tz))
57
# a lazy way to get something like the email address
58
# TODO: Get real email address
61
author = author[:author.index('@')]
63
anno = '%5s %-12s %8s' % (revno_str, author, date_str)
64
print '%-27.27s | %s' % (anno, text)
58
67
if __name__ == '__main__':