~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/smart/request.py

  • Committer: John Arbash Meinel
  • Date: 2009-10-13 18:00:16 UTC
  • mto: This revision was merged to the branch mainline in revision 4755.
  • Revision ID: john@arbash-meinel.com-20091013180016-y9ciypkm8lor58fx
Implement StaticTuple.from_sequence()

This allows casting from something that *might* be a StaticTuple
into something that is definitely a StaticTuple, without having to
create a new instance.

Show diffs side-by-side

added added

removed removed

Lines of Context:
292
292
        # cannot read after this.
293
293
        self.finished_reading = True
294
294
 
295
 
    def dispatch_command(self, cmd, args):
296
 
        """Deprecated compatibility method.""" # XXX XXX
297
 
        try:
298
 
            command = self._commands.get(cmd)
299
 
        except LookupError:
300
 
            raise errors.UnknownSmartMethod(cmd)
301
 
        self._command = command(self._backing_transport, self._root_client_path)
302
 
        self._run_handler_code(self._command.execute, args, {})
303
 
 
304
295
    def _run_handler_code(self, callable, args, kwargs):
305
296
        """Run some handler specific code 'callable'.
306
297
 
343
334
            command = self._commands.get(cmd)
344
335
        except LookupError:
345
336
            raise errors.UnknownSmartMethod(cmd)
346
 
        self._command = command(self._backing_transport)
 
337
        self._command = command(
 
338
            self._backing_transport, self._root_client_path)
347
339
        self._run_handler_code(self._command.execute, args, {})
348
340
 
349
341
    def end_received(self):
509
501
request_handlers.register_lazy(
510
502
    'BzrDir.open', 'bzrlib.smart.bzrdir', 'SmartServerRequestOpenBzrDir')
511
503
request_handlers.register_lazy(
 
504
    'BzrDir.open_2.1', 'bzrlib.smart.bzrdir', 'SmartServerRequestOpenBzrDir_2_1')
 
505
request_handlers.register_lazy(
512
506
    'BzrDir.open_branch', 'bzrlib.smart.bzrdir',
513
507
    'SmartServerRequestOpenBranch')
514
508
request_handlers.register_lazy(