~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Robert Collins
  • Date: 2008-06-25 05:04:14 UTC
  • mto: (3221.16.8 info.shallow)
  • mto: This revision was merged to the branch mainline in revision 3537.
  • Revision ID: robertc@robertcollins.net-20080625050414-lnh43c39hc0phcev
Add test that we can stack on a smart server from Jonathan Lange.

Show diffs side-by-side

added added

removed removed

Lines of Context:
181
181
            format.supports_tree_reference = (response[3] == 'yes')
182
182
            # No wire format to check this yet.
183
183
            format.supports_external_lookups = (response[4] == 'yes')
 
184
            # Used to support creating a real format instance when needed.
 
185
            format._creating_bzrdir = self
184
186
            return RemoteRepository(self, format)
185
187
        else:
186
188
            raise errors.NoRepositoryPresent(self)
239
241
 
240
242
    def initialize(self, a_bzrdir, shared=False):
241
243
        if not isinstance(a_bzrdir, RemoteBzrDir):
242
 
            raise AssertionError('%r is not a RemoteBzrDir' % (a_bzrdir,))
 
244
            prior_repo = self._creating_bzrdir.open_repository()
 
245
            prior_repo._ensure_real()
 
246
            return prior_repo._real_repository._format.initialize(
 
247
                a_bzrdir, shared=shared)
243
248
        return a_bzrdir.create_repository(shared=shared)
244
249
    
245
250
    def open(self, a_bzrdir):