~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Vincent Ladeuil
  • Date: 2012-02-01 08:25:41 UTC
  • mfrom: (6437.23.3 2.5)
  • mto: This revision was merged to the branch mainline in revision 6458.
  • Revision ID: v.ladeuil+lp@free.fr-20120201082541-73d2i8rqcjrsx4ds
Merge 2.5 branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
862
862
 
863
863
    def create_branch(self, name=None, repository=None,
864
864
            append_revisions_only=None):
865
 
        """See BzrDir.create_branch."""
 
865
        """See ControlDir.create_branch."""
866
866
        if name is None:
867
867
            name = self._get_selected_branch()
868
868
        return self._format.get_branch_format().initialize(self, name=name,
870
870
                append_revisions_only=append_revisions_only)
871
871
 
872
872
    def destroy_branch(self, name=None):
873
 
        """See BzrDir.create_branch."""
 
873
        """See ControlDir.destroy_branch."""
874
874
        if name is None:
875
875
            name = self._get_selected_branch()
876
876
        path = self._get_branch_path(name)
885
885
                self._write_branch_list(branches)
886
886
            finally:
887
887
                self.control_files.unlock()
888
 
        self.transport.delete_tree(path)
 
888
        try:
 
889
            self.transport.delete_tree(path)
 
890
        except errors.NoSuchFile:
 
891
            raise errors.NotBranchError(path=urlutils.join(self.transport.base,
 
892
                path), bzrdir=self)
889
893
 
890
894
    def create_repository(self, shared=False):
891
895
        """See BzrDir.create_repository."""