~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/repository.py

Implement RemoteBranch.lock_write/unlock as smart operations.

Because Branch.lock_write/unlock actually also lock/unlock the repository, I've
slightly changed lock_write's interface to accept and return 'tokens' rather
than 'token'.  i.e. a 2-tuple of (branch token, repo token), or None.

Show diffs side-by-side

added added

removed removed

Lines of Context:
144
144
 
145
145
class SmartServerRepositoryLockWrite(SmartServerRepositoryRequest):
146
146
 
147
 
    def do_repository_request(self, repository, token):
 
147
    def do_repository_request(self, repository, token=''):
148
148
        # XXX: this probably should not have a token.
149
149
        if token == '':
150
150
            token = None