~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Martin Pool
  • Date: 2006-03-08 09:30:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1602.
  • Revision ID: mbp@sourcefrog.net-20060308093027-c1e17961c78b16a5
Change branch format 5 to use LockDirs, not transport locks

Show diffs side-by-side

added added

removed removed

Lines of Context:
151
151
            except errors.FileExists:
152
152
                pass
153
153
 
154
 
    @staticmethod
155
 
    def create(base):
 
154
    @classmethod
 
155
    def create(cls, base):
156
156
        """Create a new BzrDir at the url 'base'.
157
157
        
158
158
        This will call the current default formats initialize with base
161
161
        If you need a specific format, consider creating an instance
162
162
        of that and calling initialize().
163
163
        """
 
164
        if cls is not BzrDir:
 
165
            raise AssertionError("BzrDir.create always creates the default format, "
 
166
                    "not one of %r" % cls)
164
167
        segments = base.split('/')
165
168
        if segments and segments[-1] not in ('', '.'):
166
169
            parent = '/'.join(segments[:-1])