/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

(John Arbash Meinel) Fix bug #75721: 'bzr push' should only connect a single time.

Show diffs side-by-side

added added

removed removed

Lines of Context:
709
709
                location = stored_loc
710
710
 
711
711
        to_transport = transport.get_transport(location)
712
 
        location_url = to_transport.base
713
712
 
714
713
        br_to = repository_to = dir_to = None
715
714
        try:
772
771
                # Now we only need to create child directories
773
772
                while needed:
774
773
                    cur_transport = needed.pop()
775
 
                    cur_transport.mkdir('.')
776
 
            
 
774
                    cur_transport.ensure_base()
 
775
 
777
776
            # Now the target directory exists, but doesn't have a .bzr
778
777
            # directory. So we need to create it, along with any work to create
779
778
            # all of the dependent branches, etc.
780
 
            dir_to = br_from.bzrdir.clone(location_url,
 
779
            dir_to = br_from.bzrdir.clone_on_transport(to_transport,
781
780
                revision_id=br_from.last_revision())
782
781
            br_to = dir_to.open_branch()
783
782
            # TODO: Some more useful message about what was copied
1284
1283
        # believe that we want to create a bunch of
1285
1284
        # locations if the user supplies an extended path
1286
1285
        # TODO: create-prefix
1287
 
        try:
1288
 
            to_transport.mkdir('.')
1289
 
        except errors.FileExists:
1290
 
            pass
1291
 
                    
 
1286
        to_transport.ensure_base()
 
1287
 
1292
1288
        try:
1293
1289
            existing_bzrdir = bzrdir.BzrDir.open(location)
1294
1290
        except errors.NotBranchError:
1349
1345
            location = '.'
1350
1346
 
1351
1347
        to_transport = transport.get_transport(location)
1352
 
        try:
1353
 
            to_transport.mkdir('.')
1354
 
        except errors.FileExists:
1355
 
            pass
 
1348
        to_transport.ensure_base()
1356
1349
 
1357
1350
        newdir = format.initialize_on_transport(to_transport)
1358
1351
        repo = newdir.create_repository(shared=True)