~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: John Arbash Meinel
  • Date: 2007-05-02 14:54:20 UTC
  • mto: (2476.3.2 111702)
  • mto: This revision was merged to the branch mainline in revision 2479.
  • Revision ID: john@arbash-meinel.com-20070502145420-k2vebnl0rd45q8kk
Change calls to try/mkdir('.')/except FileExists to ensure_base()

Show diffs side-by-side

added added

removed removed

Lines of Context:
771
771
                # Now we only need to create child directories
772
772
                while needed:
773
773
                    cur_transport = needed.pop()
774
 
                    cur_transport.mkdir('.')
775
 
            
 
774
                    cur_transport.ensure_base()
 
775
 
776
776
            # Now the target directory exists, but doesn't have a .bzr
777
777
            # directory. So we need to create it, along with any work to create
778
778
            # all of the dependent branches, etc.
1283
1283
        # believe that we want to create a bunch of
1284
1284
        # locations if the user supplies an extended path
1285
1285
        # TODO: create-prefix
1286
 
        try:
1287
 
            to_transport.mkdir('.')
1288
 
        except errors.FileExists:
1289
 
            pass
1290
 
                    
 
1286
        to_transport.ensure_base()
 
1287
 
1291
1288
        try:
1292
1289
            existing_bzrdir = bzrdir.BzrDir.open(location)
1293
1290
        except errors.NotBranchError:
1348
1345
            location = '.'
1349
1346
 
1350
1347
        to_transport = transport.get_transport(location)
1351
 
        try:
1352
 
            to_transport.mkdir('.')
1353
 
        except errors.FileExists:
1354
 
            pass
 
1348
        to_transport.ensure_base()
1355
1349
 
1356
1350
        newdir = format.initialize_on_transport(to_transport)
1357
1351
        repo = newdir.create_repository(shared=True)