~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_smart.py

  • Committer: Andrew Bennetts
  • Date: 2007-04-12 07:08:33 UTC
  • mto: (2018.18.11 hpss-faster-copy)
  • mto: This revision was merged to the branch mainline in revision 2435.
  • Revision ID: andrew.bennetts@canonical.com-20070412070833-5fio6r0fkgnf10u1
Change Branch.lock_token to only accept and receive the branch lock token (rather than the branch and repo lock tokens).

Show diffs side-by-side

added added

removed removed

Lines of Context:
389
389
        backing = self.get_transport()
390
390
        request = smart.branch.SmartServerBranchRequestLockWrite(backing)
391
391
        branch = self.make_branch('.')
392
 
        branch_token, repo_token = branch.lock_write()
 
392
        branch_token = branch.lock_write()
 
393
        repo_token = branch.repository.lock_write()
 
394
        branch.repository.unlock()
393
395
        branch.leave_lock_in_place()
394
396
        branch.repository.leave_lock_in_place()
395
397
        branch.unlock()
402
404
        backing = self.get_transport()
403
405
        request = smart.branch.SmartServerBranchRequestLockWrite(backing)
404
406
        branch = self.make_branch('.')
405
 
        branch_token, repo_token = branch.lock_write()
 
407
        branch_token = branch.lock_write()
 
408
        repo_token = branch.repository.lock_write()
 
409
        branch.repository.unlock()
406
410
        branch.leave_lock_in_place()
407
411
        branch.repository.leave_lock_in_place()
408
412
        branch.unlock()
442
446
        request = smart.branch.SmartServerBranchRequestUnlock(backing)
443
447
        branch = self.make_branch('.')
444
448
        # Lock the branch
445
 
        branch_token, repo_token = branch.lock_write()
 
449
        branch_token = branch.lock_write()
 
450
        repo_token = branch.repository.lock_write()
 
451
        branch.repository.unlock()
446
452
        # Unlock the branch (and repo) object, leaving the physical locks
447
453
        # in place.
448
454
        branch.leave_lock_in_place()