~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: aaron.bentley at utoronto
  • Date: 2005-07-15 03:36:09 UTC
  • mto: This revision was merged to the branch mainline in revision 923.
  • Revision ID: aaron.bentley@utoronto.ca-20050715033609-f46817aa7a648d67
Fixed branch's --revision argument

Show diffs side-by-side

added added

removed removed

Lines of Context:
588
588
        import tempfile
589
589
        cache_root = tempfile.mkdtemp()
590
590
 
591
 
        if revision is not None:
 
591
        if revision is None:
 
592
            revision = [None]
 
593
        else:
592
594
            if len(revision) > 1:
593
595
                raise BzrCommandError('bzr branch --revision takes exactly 1 revision value')
594
596
        try:
620
622
            br_to.set_root_id(br_from.get_root_id())
621
623
 
622
624
            if revision:
623
 
                revno = br_to.lookup_revision(revision[0])
 
625
                if revision[0] is None:
 
626
                    revno = br_from.revno()
 
627
                else:
 
628
                    revno, rev_id = br_from.get_revision_info(revision[0])
624
629
                try:
625
630
                    br_to.update_revisions(br_from, stop_revision=revno)
626
631
                except NoSuchRevision: