~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/lockdir.py

Implement RemoteRepository.lock_write/unlock to expect and send tokens over the
smart protocol as appropriate, so that locking operations on RemoteRepositories
work correctly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
444
444
            self.nonce = token
445
445
            self._lock_held = True
446
446
            self._locked_via_token = True
 
447
            return token
447
448
        else:
448
449
            self.wait_lock()
449
450
            return self.peek().get('nonce')