At http://people.ubuntu.com/~robertc/baz2.0/RemoteRepository._format
------------------------------------------------------------ revno: 4058 revision-id: [email protected] parent: [email protected] committer: Robert Collins <[email protected]> branch nick: RemoteRepository._format timestamp: Fri 2009-02-27 12:21:59 +1100 message: Review feedback on RemoteRepository._set_real_revision. === modified file 'bzrlib/remote.py' --- a/bzrlib/remote.py 2009-02-27 01:02:40 +0000 +++ b/bzrlib/remote.py 2009-02-27 01:21:59 +0000 @@ -792,11 +792,12 @@ :param repository: The repository to fallback to for non-hpss implemented operations. """ - # There was an assertion that this real repository was never replaced; - # However for down level serves we always open the real repository, - # which means that opening the branch ends up replacing it. Rather than - # write to real_branch.repository, we just allow the _real_repository - # object to be replaced. + if self._real_repository is not None: + # Replacing an already set real repository. + # We cannot do this [currently] if the repository is locked - + # synchronised state might be lost. + if self.is_locked(): + raise AssertionError('_real_repository is already set') if isinstance(repository, RemoteRepository): raise AssertionError() self._real_repository = repository -- bazaar-commits mailing list [email protected] https://lists.ubuntu.com/mailman/listinfo/bazaar-commits
