~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/request.py

  • Committer: Robert Collins
  • Date: 2010-05-06 23:54:05 UTC
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100506235405-wii4elupfhzl3jvy
Add __str__ to the new helper classes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
446
446
        return ('TokenMismatch', err.given_token, err.lock_token)
447
447
    elif isinstance(err, errors.LockContention):
448
448
        return ('LockContention',)
449
 
    elif isinstance(err, MemoryError):
450
 
        # GZ 2011-02-24: Copy bzrlib.trace -Dmem_dump functionality here?
451
 
        return ('MemoryError',)
452
449
    # Unserialisable error.  Log it, and return a generic error
453
450
    trace.log_exception_quietly()
454
 
    return ('error', trace._qualified_exception_name(err.__class__, True),
455
 
        str(err))
 
451
    return ('error', str(err))
456
452
 
457
453
 
458
454
class HelloRequest(SmartServerRequest):
505
501
    'Branch.set_tags_bytes', 'bzrlib.smart.branch',
506
502
    'SmartServerBranchSetTagsBytes')
507
503
request_handlers.register_lazy(
508
 
    'Branch.heads_to_fetch', 'bzrlib.smart.branch',
509
 
    'SmartServerBranchHeadsToFetch')
510
 
request_handlers.register_lazy(
511
504
    'Branch.get_stacked_on_url', 'bzrlib.smart.branch', 'SmartServerBranchRequestGetStackedOnURL')
512
505
request_handlers.register_lazy(
513
506
    'Branch.last_revision_info', 'bzrlib.smart.branch', 'SmartServerBranchRequestLastRevisionInfo')
517
510
    'bzrlib.smart.branch', 'SmartServerRequestRevisionHistory')
518
511
request_handlers.register_lazy( 'Branch.set_config_option',
519
512
    'bzrlib.smart.branch', 'SmartServerBranchRequestSetConfigOption')
520
 
request_handlers.register_lazy( 'Branch.set_config_option_dict',
521
 
    'bzrlib.smart.branch', 'SmartServerBranchRequestSetConfigOptionDict')
522
513
request_handlers.register_lazy( 'Branch.set_last_revision',
523
514
    'bzrlib.smart.branch', 'SmartServerBranchRequestSetLastRevision')
524
515
request_handlers.register_lazy(