~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/repository.py

  • Committer: Jelmer Vernooij
  • Date: 2011-12-11 13:30:10 UTC
  • mto: This revision was merged to the branch mainline in revision 6354.
  • Revision ID: jelmer@samba.org-20111211133010-p8ox9ybu2knzm7h4
Fix test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1107
1107
    New in 2.5.
1108
1108
    """
1109
1109
 
1110
 
    def do_repository_request(self, repository):
1111
 
        reconciler = repository.reconcile()
 
1110
    def do_repository_request(self, repository, lock_token):
 
1111
        try:
 
1112
            repository.lock_write(token=lock_token)
 
1113
        except errors.TokenLockingNotSupported, e:
 
1114
            return FailedSmartServerResponse(
 
1115
                ('TokenLockingNotSupported', ))
 
1116
        try:
 
1117
            reconciler = repository.reconcile()
 
1118
        finally:
 
1119
            repository.unlock()
1112
1120
        body = [
1113
1121
            "garbage_inventories: %d\n" % reconciler.garbage_inventories,
1114
1122
            "inconsistent_parents: %d\n" % reconciler.inconsistent_parents,