~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-01 22:41:41 UTC
  • mto: (2476.3.1 111702)
  • mto: This revision was merged to the branch mainline in revision 2479.
  • Revision ID: john@arbash-meinel.com-20070501224141-23intuz4dabm0j73
Fix bug #75721. Update the BzrDir api to add clone_on_transport()
This allows us to pass around a Transport which we already have open
rather calling get_transport(url).
This is mostly noticeable in 'bzr push' which was connecting 3-4 times.

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:
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