~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

Various small changes in aid of making tests pass (including deleting one invalid test).

Show diffs side-by-side

added added

removed removed

Lines of Context:
138
138
        """Upgrading of remote bzrdirs is not supported yet."""
139
139
        return False
140
140
 
 
141
    def clone(self, url, revision_id=None, basis=None, force_new_repo=False):
 
142
        self._ensure_real()
 
143
        return self._real_bzrdir.clone(url, revision_id=revision_id,
 
144
            basis=basis, force_new_repo=force_new_repo)
 
145
 
 
146
    #def sprout(self, url, revision_id=None, basis=None, force_new_repo=False):
 
147
    #    self._ensure_real()
 
148
    #    return self._real_bzrdir.sprout(url, revision_id=revision_id,
 
149
    #        basis=basis, force_new_repo=force_new_repo)
 
150
 
141
151
 
142
152
class RemoteRepositoryFormat(repository.RepositoryFormat):
143
153
    """Format for repositories accessed over rpc.
799
809
    def get_config(self):
800
810
        return RemoteBranchConfig(self)
801
811
 
 
812
    def sprout(self, to_bzrdir, revision_id=None):
 
813
        # Like Branch.sprout, except that it sprouts a branch in the default
 
814
        # format, because RemoteBranches can't be created at arbitrary URLs.
 
815
        # XXX: if to_bzrdir is a RemoteBranch, this should perhaps do
 
816
        # to_bzrdir.create_branch...
 
817
        self._ensure_real()
 
818
        result = branch.BranchFormat.get_default_format().initialize(to_bzrdir)
 
819
        self._real_branch.copy_content_into(result, revision_id=revision_id)
 
820
        result.set_parent(self.bzrdir.root_transport.base)
 
821
        return result
 
822
 
802
823
    @needs_write_lock
803
824
    def append_revision(self, *revision_ids):
804
825
        self._ensure_real()