~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2005-05-05 06:51:01 UTC
  • Revision ID: mbp@sourcefrog.net-20050505065100-ccd10da9e78c2b27
- New --show-ids option for bzr log

Show diffs side-by-side

added added

removed removed

Lines of Context:
773
773
 
774
774
 
775
775
 
776
 
    def write_log(self, show_timezone='original', verbose=False):
 
776
    def write_log(self, show_timezone='original', verbose=False,
 
777
                  show_ids=False):
777
778
        """Write out human-readable log of commits to this branch.
778
779
 
779
 
        show_timezone -- may be 'original' (committer's timezone),
780
 
            'utc' (universal time), or 'local' (local user's timezone)
781
 
 
782
 
        verbose -- if true, also list which files were changed in each
783
 
            revision.
 
780
        show_timezone
 
781
            'original' (committer's timezone),
 
782
            'utc' (universal time), or
 
783
            'local' (local user's timezone)
 
784
 
 
785
        verbose
 
786
            If true show added/changed/deleted/renamed files.
 
787
 
 
788
        show_ids
 
789
            If true, show revision and file ids.
784
790
        """
785
791
        
786
792
        self._need_readlock()
789
795
        for p in self.revision_history():
790
796
            print '-' * 40
791
797
            print 'revno:', revno
792
 
            ## TODO: Show hash if --id is given.
793
 
            ##print 'revision-hash:', p
794
798
            rev = self.get_revision(p)
 
799
            if show_ids:
 
800
                print 'revision-id:', rev.revision_id
795
801
            print 'committer:', rev.committer
796
802
            print 'timestamp: %s' % (format_date(rev.timestamp, rev.timezone or 0,
797
803
                                                 show_timezone))
808
814
                    print '  ' + l
809
815
 
810
816
            if verbose == True and precursor != None:
 
817
                # TODO: Group as added/deleted/renamed instead
 
818
                # TODO: Show file ids
811
819
                print 'changed files:'
812
820
                tree = self.revision_tree(p)
813
821
                prevtree = self.revision_tree(precursor)