605
607
lr = LogRevision(rev, revno, 0, delta, tags)
606
608
return self.log_revision(lr)
608
@deprecated_method(zero_eleven)
609
def show_merge(self, rev, merge_depth):
610
lr = LogRevision(rev, merge_depth=merge_depth)
611
return self.log_revision(lr)
613
610
@deprecated_method(zero_seventeen)
614
611
def show_merge_revno(self, rev, merge_depth, revno, tags=None):
615
612
"""Show a merged revision rev, with merge_depth and a revno."""
619
616
def log_revision(self, revision):
620
617
"""Log a revision, either merged or not."""
621
618
from bzrlib.osutils import format_date
622
indent = ' '*revision.merge_depth
619
indent = ' ' * revision.merge_depth
623
620
to_file = self.to_file
624
print >>to_file, indent+'-' * 60
621
print >>to_file, indent + '-' * 60
625
622
if revision.revno is not None:
626
print >>to_file, indent+'revno:', revision.revno
623
print >>to_file, indent + 'revno:', revision.revno
627
624
if revision.tags:
628
print >>to_file, indent+'tags: %s' % (', '.join(revision.tags))
625
print >>to_file, indent + 'tags: %s' % (', '.join(revision.tags))
629
626
if self.show_ids:
630
print >>to_file, indent+'revision-id:', revision.rev.revision_id
627
print >>to_file, indent + 'revision-id:', revision.rev.revision_id
631
628
for parent_id in revision.rev.parent_ids:
632
print >>to_file, indent+'parent:', parent_id
633
print >>to_file, indent+'committer:', revision.rev.committer
636
print >>to_file, indent+'branch nick: %s' % \
637
revision.rev.properties['branch-nick']
629
print >>to_file, indent + 'parent:', parent_id
631
author = revision.rev.properties.get('author', None)
632
if author is not None:
633
print >>to_file, indent + 'author:', author
634
print >>to_file, indent + 'committer:', revision.rev.committer
636
branch_nick = revision.rev.properties.get('branch-nick', None)
637
if branch_nick is not None:
638
print >>to_file, indent + 'branch nick:', branch_nick
640
640
date_str = format_date(revision.rev.timestamp,
641
641
revision.rev.timezone or 0,
642
642
self.show_timezone)
643
print >>to_file, indent+'timestamp: %s' % date_str
643
print >>to_file, indent + 'timestamp: %s' % date_str
645
print >>to_file, indent+'message:'
645
print >>to_file, indent + 'message:'
646
646
if not revision.rev.message:
647
print >>to_file, indent+' (no message)'
647
print >>to_file, indent + ' (no message)'
649
649
message = revision.rev.message.rstrip('\r\n')
650
650
for l in message.split('\n'):
651
print >>to_file, indent+' ' + l
651
print >>to_file, indent + ' ' + l
652
652
if revision.delta is not None:
653
653
revision.delta.show(to_file, self.show_ids, indent=indent)
673
673
if len(revision.rev.parent_ids) > 1:
674
674
is_merge = ' [merge]'
675
675
print >>to_file, "%5s %s\t%s%s" % (revision.revno,
676
self.short_committer(revision.rev),
676
self.short_author(revision.rev),
677
677
format_date(revision.rev.timestamp,
678
678
revision.rev.timezone or 0,
679
679
self.show_timezone, date_fmt="%Y-%m-%d",