838
839
if len(revision.rev.parent_ids) > 1:
839
840
is_merge = ' [merge]'
840
to_file.write("%5s %s\t%s%s\n" % (revision.revno,
843
tags = '{%s}' % (', '.join(revision.tags))
845
to_file.write("%5s %s\t%s%s%s\n" % (revision.revno,
841
846
self.short_author(revision.rev),
842
847
format_date(revision.rev.timestamp,
843
848
revision.rev.timezone or 0,
844
849
self.show_timezone, date_fmt="%Y-%m-%d",
845
850
show_offset=False),
847
852
if self.show_ids:
848
853
to_file.write(' revision-id:%s\n'
849
854
% (revision.rev.revision_id,))
887
893
def log_revision(self, revision):
888
894
self.to_file.write(self.log_string(revision.revno, revision.rev,
895
self._max_chars, revision.tags))
890
896
self.to_file.write('\n')
892
def log_string(self, revno, rev, max_chars):
898
def log_string(self, revno, rev, max_chars, tags=None):
893
899
"""Format log info into one string. Truncate tail of string
894
900
:param revno: revision number or None.
895
901
Revision numbers counts from 1.
896
:param rev: revision info object
902
:param rev: revision object
897
903
:param max_chars: maximum length of resulting string
904
:param tags: list of tags or None
898
905
:return: formatted truncated string
902
909
# show revno only when is not None
903
out.append("%s:" % revno)
912
tag_str = '/%s' % (','.join(tags))
913
out.append("%s%s:" % (revno,tag_str))
904
914
out.append(self.truncate(self.short_author(rev), 20))
905
915
out.append(self.date_string(rev))
906
916
out.append(rev.get_summary())