/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/smart/request.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-29 21:35:05 UTC
  • mfrom: (4576 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4577.
  • Revision ID: john@arbash-meinel.com-20090729213505-tkqsvy1zfpocu75w
Merge bzr.dev 4576 in prep for NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
281
281
 
282
282
    def accept_body(self, bytes):
283
283
        """Accept body data."""
 
284
        if self._command is None:
 
285
            # no active command object, so ignore the event.
 
286
            return
284
287
        self._run_handler_code(self._command.do_chunk, (bytes,), {})
285
288
 
286
289
    def end_of_body(self):
344
347
        self._run_handler_code(self._command.execute, args, {})
345
348
 
346
349
    def end_received(self):
 
350
        if self._command is None:
 
351
            # no active command object, so ignore the event.
 
352
            return
347
353
        self._run_handler_code(self._command.do_end, (), {})
348
354
 
349
355
    def post_body_error_received(self, error_args):
392
398
    elif isinstance(err, errors.TokenMismatch):
393
399
        return ('TokenMismatch', err.given_token, err.lock_token)
394
400
    elif isinstance(err, errors.LockContention):
395
 
        return ('LockContention', err.lock, err.msg)
 
401
        return ('LockContention',)
396
402
    # Unserialisable error.  Log it, and return a generic error
397
403
    trace.log_exception_quietly()
398
404
    return ('error', str(err))
445
451
    'Branch.get_tags_bytes', 'bzrlib.smart.branch',
446
452
    'SmartServerBranchGetTagsBytes')
447
453
request_handlers.register_lazy(
 
454
    'Branch.set_tags_bytes', 'bzrlib.smart.branch',
 
455
    'SmartServerBranchSetTagsBytes')
 
456
request_handlers.register_lazy(
448
457
    'Branch.get_stacked_on_url', 'bzrlib.smart.branch', 'SmartServerBranchRequestGetStackedOnURL')
449
458
request_handlers.register_lazy(
450
459
    'Branch.last_revision_info', 'bzrlib.smart.branch', 'SmartServerBranchRequestLastRevisionInfo')
492
501
    'BzrDirFormat.initialize', 'bzrlib.smart.bzrdir',
493
502
    'SmartServerRequestInitializeBzrDir')
494
503
request_handlers.register_lazy(
495
 
    'BzrDirFormat.initialize_ex', 'bzrlib.smart.bzrdir',
 
504
    'BzrDirFormat.initialize_ex_1.16', 'bzrlib.smart.bzrdir',
496
505
    'SmartServerRequestBzrDirInitializeEx')
497
506
request_handlers.register_lazy(
498
507
    'BzrDir.open', 'bzrlib.smart.bzrdir', 'SmartServerRequestOpenBzrDir')
555
564
request_handlers.register_lazy(
556
565
    'Repository.unlock', 'bzrlib.smart.repository', 'SmartServerRepositoryUnlock')
557
566
request_handlers.register_lazy(
 
567
    'Repository.get_rev_id_for_revno', 'bzrlib.smart.repository',
 
568
    'SmartServerRepositoryGetRevIdForRevno')
 
569
request_handlers.register_lazy(
558
570
    'Repository.get_stream', 'bzrlib.smart.repository',
559
571
    'SmartServerRepositoryGetStream')
560
572
request_handlers.register_lazy(