~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Robert Collins
  • Date: 2006-04-18 22:41:16 UTC
  • mto: (1711.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 1671.
  • Revision ID: robertc@robertcollins.net-20060418224116-9b723440fa56e404
 * 'Metadir' is now the default disk format. This improves behaviour in
   SFTP using circumstances and allows binding and rebinding and easier
   use of repositories. (Robert Collins, Aaron Bentley).

Show diffs side-by-side

added added

removed removed

Lines of Context:
740
740
        from bzrlib.workingtree import WorkingTreeFormat
741
741
        return WorkingTreeFormat.get_default_format().initialize(self, revision_id)
742
742
 
 
743
    def _get_mkdir_mode(self):
 
744
        """Figure out the mode to use when creating a bzrdir subdir."""
 
745
        temp_control = LockableFiles(self.transport, '', TransportLock)
 
746
        return temp_control._dir_mode
 
747
 
743
748
    def get_branch_transport(self, branch_format):
744
749
        """See BzrDir.get_branch_transport()."""
745
750
        if branch_format is None:
749
754
        except NotImplementedError:
750
755
            raise errors.IncompatibleFormat(branch_format, self._format)
751
756
        try:
752
 
            self.transport.mkdir('branch')
 
757
            self.transport.mkdir('branch', mode=self._get_mkdir_mode())
753
758
        except errors.FileExists:
754
759
            pass
755
760
        return self.transport.clone('branch')
763
768
        except NotImplementedError:
764
769
            raise errors.IncompatibleFormat(repository_format, self._format)
765
770
        try:
766
 
            self.transport.mkdir('repository')
 
771
            self.transport.mkdir('repository', mode=self._get_mkdir_mode())
767
772
        except errors.FileExists:
768
773
            pass
769
774
        return self.transport.clone('repository')
777
782
        except NotImplementedError:
778
783
            raise errors.IncompatibleFormat(workingtree_format, self._format)
779
784
        try:
780
 
            self.transport.mkdir('checkout')
 
785
            self.transport.mkdir('checkout', mode=self._get_mkdir_mode())
781
786
        except errors.FileExists:
782
787
            pass
783
788
        return self.transport.clone('checkout')
1186
1191
 
1187
1192
BzrDirFormat.register_format(BzrDirFormat4())
1188
1193
BzrDirFormat.register_format(BzrDirFormat5())
1189
 
BzrDirFormat.register_format(BzrDirMetaFormat1())
1190
 
__default_format = BzrDirFormat6()
 
1194
BzrDirFormat.register_format(BzrDirFormat6())
 
1195
__default_format = BzrDirMetaFormat1()
1191
1196
BzrDirFormat.register_format(__default_format)
1192
1197
BzrDirFormat.set_default_format(__default_format)
1193
1198