~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Martin Pool
  • Date: 2009-07-07 06:43:33 UTC
  • mto: This revision was merged to the branch mainline in revision 4566.
  • Revision ID: mbp@sourcefrog.net-20090707064333-127o7rntistzz9eg
Branch._unstack no longer tries to propagate fetch tags, therefore doesn't fall over if they're not in the fallback repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
695
695
            # repositories today; take the conceptually simpler option and just
696
696
            # reopen it.
697
697
            self.repository = self.bzrdir.find_repository()
 
698
            # this is not paired with an unlock because it's just restoring
 
699
            # the previous state; the lock's released when set_stacked_on_url
 
700
            # returns
698
701
            self.repository.lock_write()
699
 
            try:
700
 
                # for every revision reference the branch has, ensure it
701
 
                # is pulled in.
702
 
                for revision_id in chain([self.last_revision()],
703
 
                    self.tags.get_reverse_tag_dict()):
704
 
                    self.repository.fetch(old_fallback_repository,
705
 
                        revision_id,
706
 
                        find_ghosts=True)
707
 
            finally:
708
 
                self.repository.unlock()
 
702
            # XXX: This should probably bring across revisions referenced
 
703
            # by tags if they're in the old fallback repository, but not
 
704
            # error if they're not.  However, branch doesn't do that at
 
705
            # present and this is consistent with that: the only tags that
 
706
            # are preserved are those in the history of the branch.
 
707
            #
 
708
            # XXX: If you unstack a branch while it has a working tree
 
709
            # with a pending merge, the pending-merged revisions will no
 
710
            # longer be present.  You can (probably) revert and remerge.
 
711
            self.repository.fetch(old_fallback_repository,
 
712
                self.last_revision(),
 
713
                find_ghosts=True)
709
714
        finally:
710
715
            pb.finished()
711
716