/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: Lukáš Lalinský
  • Date: 2007-08-07 20:45:21 UTC
  • mto: (2755.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 2709.
  • Revision ID: lalinsky@gmail.com-20070807204521-q9iwgzhwei1sf96h
Fixes for comments from the mailing list.

 - Raise AssertionError from MutableTree.commit if both author kwarg and revprop are set.
 - Fixed code formatting in LongLogFormatter.log_revision.
 - Fixed punctuation in the developer docs.

Show diffs side-by-side

added added

removed removed

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