~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Martin Pool
  • Date: 2005-09-13 05:11:27 UTC
  • Revision ID: mbp@sourcefrog.net-20050913051127-47c500210200a219
- branch now tracks ancestry - all merged revisions

 - new Branch.get_ancestry() returns them as a list

 - basic test for this

 - commit appends to ancestry (only for non-merge commits)
 
 - clean up imports

Show diffs side-by-side

added added

removed removed

Lines of Context:
484
484
            print patchid
485
485
 
486
486
 
 
487
class cmd_ancestry(Command):
 
488
    """List all revisions merged into this branch."""
 
489
    hidden = True
 
490
    def run(self):
 
491
        b = find_branch('.')
 
492
        for revision_id in b.get_ancestry(b.last_patch()):
 
493
            print revision_id
 
494
 
 
495
 
487
496
class cmd_directories(Command):
488
497
    """Display list of versioned directories in this branch."""
489
498
    def run(self):