~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2007-11-30 07:30:50 UTC
  • mfrom: (3047.1.5 preserve-format-from-hpss)
  • Revision ID: pqm@pqm.ubuntu.com-20071130073050-wqh13t7fars5qbhl
Preserve repository format when branching from a smart server
        (#164626, Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
595
595
 
596
596
    def sprout(self, to_bzrdir, revision_id=None):
597
597
        # TODO: Option to control what format is created?
598
 
        dest_repo = to_bzrdir.create_repository()
 
598
        self._ensure_real()
 
599
        dest_repo = self._real_repository._format.initialize(to_bzrdir,
 
600
                                                             shared=False)
599
601
        dest_repo.fetch(self, revision_id=revision_id)
600
602
        return dest_repo
601
603
 
1232
1234
        # format, because RemoteBranches can't be created at arbitrary URLs.
1233
1235
        # XXX: if to_bzrdir is a RemoteBranch, this should perhaps do
1234
1236
        # to_bzrdir.create_branch...
1235
 
        result = branch.BranchFormat.get_default_format().initialize(to_bzrdir)
 
1237
        self._ensure_real()
 
1238
        result = self._real_branch._format.initialize(to_bzrdir)
1236
1239
        self.copy_content_into(result, revision_id=revision_id)
1237
1240
        result.set_parent(self.bzrdir.root_transport.base)
1238
1241
        return result