~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

  • Committer: Robert Collins
  • Date: 2009-02-19 03:35:43 UTC
  • mfrom: (3990.5.3 network-name)
  • mto: This revision was merged to the branch mainline in revision 4023.
  • Revision ID: robertc@robertcollins.net-20090219033543-s63jjuz9vcgrnio9
Add effort test for init-repo on smart server urls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
            format.supports_external_lookups = (response[4] == 'yes')
206
206
            # Used to support creating a real format instance when needed.
207
207
            format._creating_bzrdir = self
208
 
            return RemoteRepository(self, format)
 
208
            remote_repo = RemoteRepository(self, format)
 
209
            format._creating_repo = remote_repo
 
210
            return remote_repo
209
211
        else:
210
212
            raise errors.NoRepositoryPresent(self)
211
213
 
265
267
    the attributes rich_root_data and supports_tree_reference are set
266
268
    on a per instance basis, and are not set (and should not be) at
267
269
    the class level.
 
270
 
 
271
    :ivar _custom_format: If set, a specific concrete repository format that 
 
272
        will be used when initializing a repository with this
 
273
        RemoteRepositoryFormat.
 
274
    :ivar _creating_repo: If set, the repository object that this
 
275
        RemoteRepositoryFormat was created for: it can be called into
 
276
        to obtain data like te network name.
268
277
    """
269
278
 
270
279
    _matchingbzrdir = RemoteBzrDirFormat()
312
321
            raise errors.BadConversionTarget(
313
322
                'Does not support nested trees', target_format)
314
323
 
 
324
    def network_name(self):
 
325
        self._creating_repo._ensure_real()
 
326
        return self._creating_repo._real_repository._format.network_name()
 
327
 
315
328
 
316
329
class RemoteRepository(_RpcHelper):
317
330
    """Repository accessed over rpc.