~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-12-14 22:26:50 UTC
  • mfrom: (2182.3.11 annotate_show_ids)
  • Revision ID: pqm@pqm.ubuntu.com-20061214222650-3fb161bed571e550
(John Arbash Meinel) Update 'bzr annotate' to show dotted revnos, or revision ids on request

Show diffs side-by-side

added added

removed removed

Lines of Context:
2691
2691
    takes_args = ['filename']
2692
2692
    takes_options = [Option('all', help='show annotations on all lines'),
2693
2693
                     Option('long', help='show date in annotations'),
2694
 
                     'revision'
 
2694
                     'revision',
 
2695
                     'show-ids',
2695
2696
                     ]
2696
2697
 
2697
2698
    @display_command
2698
 
    def run(self, filename, all=False, long=False, revision=None):
 
2699
    def run(self, filename, all=False, long=False, revision=None,
 
2700
            show_ids=False):
2699
2701
        from bzrlib.annotate import annotate_file
2700
2702
        tree, relpath = WorkingTree.open_containing(filename)
2701
2703
        branch = tree.branch
2710
2712
            file_id = tree.inventory.path2id(relpath)
2711
2713
            tree = branch.repository.revision_tree(revision_id)
2712
2714
            file_version = tree.inventory[file_id].revision
2713
 
            annotate_file(branch, file_version, file_id, long, all, sys.stdout)
 
2715
            annotate_file(branch, file_version, file_id, long, all, sys.stdout,
 
2716
                          show_ids=show_ids)
2714
2717
        finally:
2715
2718
            branch.unlock()
2716
2719