~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/request.py

Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
179
179
                other.body_stream is self.body_stream)
180
180
 
181
181
    def __repr__(self):
182
 
        status = {True: 'OK', False: 'ERR'}[self.is_successful()]
183
 
        return "<SmartServerResponse status=%s args=%r body=%r>" % (status,
 
182
        return "<%s args=%r body=%r>" % (self.__class__.__name__,
184
183
            self.args, self.body)
185
184
 
186
185
 
288
287
        except errors.ShortReadvError, e:
289
288
            return FailedSmartServerResponse(('ShortReadvError',
290
289
                e.path, str(e.offset), str(e.length), str(e.actual)))
 
290
        except errors.UnstackableRepositoryFormat, e:
 
291
            return FailedSmartServerResponse(('UnstackableRepositoryFormat',
 
292
                str(e.format), e.url))
 
293
        except errors.UnstackableBranchFormat, e:
 
294
            return FailedSmartServerResponse(('UnstackableBranchFormat',
 
295
                str(e.format), e.url))
 
296
        except errors.NotStacked, e:
 
297
            return FailedSmartServerResponse(('NotStacked',))
291
298
        except UnicodeError, e:
292
299
            # If it is a DecodeError, than most likely we are starting
293
300
            # with a plain string
375
382
request_handlers.register_lazy(
376
383
    'Branch.get_config_file', 'bzrlib.smart.branch', 'SmartServerBranchGetConfigFile')
377
384
request_handlers.register_lazy(
 
385
    'Branch.get_stacked_on_url', 'bzrlib.smart.branch', 'SmartServerBranchRequestGetStackedOnURL')
 
386
request_handlers.register_lazy(
378
387
    'Branch.last_revision_info', 'bzrlib.smart.branch', 'SmartServerBranchRequestLastRevisionInfo')
379
388
request_handlers.register_lazy(
380
389
    'Branch.lock_write', 'bzrlib.smart.branch', 'SmartServerBranchRequestLockWrite')