/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Martin Pool
  • Date: 2007-08-16 01:04:10 UTC
  • mfrom: (2709 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2712.
  • Revision ID: mbp@sourcefrog.net-20070816010410-92814aa40xf7lja4
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
613
613
    def log_revision(self, revision):
614
614
        """Log a revision, either merged or not."""
615
615
        from bzrlib.osutils import format_date
616
 
        indent = '    '*revision.merge_depth
 
616
        indent = '    ' * revision.merge_depth
617
617
        to_file = self.to_file
618
 
        print >>to_file,  indent+'-' * 60
 
618
        print >>to_file, indent + '-' * 60
619
619
        if revision.revno is not None:
620
 
            print >>to_file,  indent+'revno:', revision.revno
 
620
            print >>to_file, indent + 'revno:', revision.revno
621
621
        if revision.tags:
622
 
            print >>to_file, indent+'tags: %s' % (', '.join(revision.tags))
 
622
            print >>to_file, indent + 'tags: %s' % (', '.join(revision.tags))
623
623
        if self.show_ids:
624
 
            print >>to_file, indent+'revision-id:', revision.rev.revision_id
 
624
            print >>to_file, indent + 'revision-id:', revision.rev.revision_id
625
625
            for parent_id in revision.rev.parent_ids:
626
 
                print >>to_file, indent+'parent:', parent_id
627
 
        print >>to_file, indent+'committer:', revision.rev.committer
628
 
 
629
 
        try:
630
 
            print >>to_file, indent+'branch nick: %s' % \
631
 
                revision.rev.properties['branch-nick']
632
 
        except KeyError:
633
 
            pass
 
626
                print >>to_file, indent + 'parent:', parent_id
 
627
        print >>to_file, indent + 'committer:', revision.rev.committer
 
628
 
 
629
        author = revision.rev.properties.get('author', None)
 
630
        if author is not None:
 
631
            print >>to_file, indent + 'author:', author
 
632
 
 
633
        branch_nick = revision.rev.properties.get('branch-nick', None)
 
634
        if branch_nick is not None:
 
635
            print >>to_file, indent + 'branch nick:', branch_nick
 
636
 
634
637
        date_str = format_date(revision.rev.timestamp,
635
638
                               revision.rev.timezone or 0,
636
639
                               self.show_timezone)
637
 
        print >>to_file,  indent+'timestamp: %s' % date_str
 
640
        print >>to_file, indent + 'timestamp: %s' % date_str
638
641
 
639
 
        print >>to_file,  indent+'message:'
 
642
        print >>to_file, indent + 'message:'
640
643
        if not revision.rev.message:
641
 
            print >>to_file,  indent+'  (no message)'
 
644
            print >>to_file, indent + '  (no message)'
642
645
        else:
643
646
            message = revision.rev.message.rstrip('\r\n')
644
647
            for l in message.split('\n'):
645
 
                print >>to_file,  indent+'  ' + l
 
648
                print >>to_file, indent + '  ' + l
646
649
        if revision.delta is not None:
647
650
            revision.delta.show(to_file, self.show_ids, indent=indent)
648
651