~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/remote.py

(jameinel) Bug #835035, if a fallback repository is incompatible,
        don't leave it locked. (Gary Poster)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1250
1250
        # We need to accumulate additional repositories here, to pass them in
1251
1251
        # on various RPC's.
1252
1252
        #
 
1253
        # Make the check before we lock: this raises an exception.
 
1254
        self._check_fallback_repository(repository)
1253
1255
        if self.is_locked():
1254
1256
            # We will call fallback.unlock() when we transition to the unlocked
1255
1257
            # state, so always add a lock here. If a caller passes us a locked
1256
1258
            # repository, they are responsible for unlocking it later.
1257
1259
            repository.lock_read()
1258
 
        self._check_fallback_repository(repository)
1259
1260
        self._fallback_repositories.append(repository)
1260
1261
        # If self._real_repository was parameterised already (e.g. because a
1261
1262
        # _real_branch had its get_stacked_on_url method called), then the