~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-05-08 03:33:57 UTC
  • Revision ID: mbp@sourcefrog.net-20050508033357-3abe83faae4d1400
- Fix argument handling in export command 
- Add test

  Thanks to Aaron and Wilk

Show diffs side-by-side

added added

removed removed

Lines of Context:
538
538
    If no revision is specified this exports the last committed revision."""
539
539
    takes_args = ['dest']
540
540
    takes_options = ['revision']
541
 
    def run(self, dest, revno=None):
 
541
    def run(self, dest, revision=None):
542
542
        b = Branch('.')
543
 
        if revno == None:
544
 
            rh = b.revision_history[-1]
 
543
        if revision == None:
 
544
            rh = b.revision_history()[-1]
545
545
        else:
546
 
            rh = b.lookup_revision(int(revno))
 
546
            rh = b.lookup_revision(int(revision))
547
547
        t = b.revision_tree(rh)
548
548
        t.export(dest)
549
549