~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commands.py

  • Committer: Martin Pool
  • Date: 2005-07-11 07:33:45 UTC
  • Revision ID: mbp@sourcefrog.net-20050711073345-177b10e674961bda
- merge John's code to give the tree root an explicit file id

Show diffs side-by-side

added added

removed removed

Lines of Context:
617
617
                    raise
618
618
            br_to = Branch(to_location, init=True)
619
619
 
620
 
            revno = br_to.lookup_revision(revision[0])
621
 
            try:
622
 
                br_to.update_revisions(br_from, stop_revision=revno)
623
 
            except NoSuchRevision:
624
 
                rmtree(to_location)
625
 
                msg = "The branch %s has no revision %d." % (from_location,
626
 
                                                             revno)
627
 
                raise BzrCommandError(msg)
 
620
            br_to.set_root_id(br_from.get_root_id())
 
621
 
 
622
            if revision:
 
623
                revno = br_to.lookup_revision(revision[0])
 
624
                try:
 
625
                    br_to.update_revisions(br_from, stop_revision=revno)
 
626
                except NoSuchRevision:
 
627
                    rmtree(to_location)
 
628
                    msg = "The branch %s has no revision %d." % (from_location,
 
629
                                                                 revno)
 
630
                    raise BzrCommandError(msg)
 
631
            
628
632
            merge((to_location, -1), (to_location, 0), this_dir=to_location,
629
633
                  check_clean=False, ignore_zero=True)
630
634
            from_location = pull_loc(br_from)