self.local_site_name = m.group(1) base = base.replace(m.group(0), '') else: self.local_site_name = None super(RBRemoteSSHTransport, self).__init__( base.encode('ascii'), *args, **kwargs) def _build_medium(self): client_medium, auth = \ super(RBRemoteSSHTransport, self)._build_medium() client_medium._vendor = RBSSHVendor(self.local_site_name) return client_medium, auth vendor = RBSSHVendor() register_ssh_vendor("rbssh", vendor) register_default_ssh_vendor(vendor) sshutils.register_rbssh('BZR_SSH') register_lazy_transport('bzr+ssh://', 'reviewboard.scmtools.bzr', 'RBRemoteSSHTransport') class BZRTool(SCMTool): """An interface to the Bazaar SCM (http://bazaar-vcs.org/)""" name = "Bazaar" dependencies = { 'modules': ['bzrlib'], } # Timestamp format in bzr diffs. # This isn't totally accurate: there should be a %z at the end.
subsystem (unicode, optional): The SSH subsystem to use. command (unicode, optional): The command to invoke through the SSH connection. Returns: list of unicode: The list of arguments to pass to :command:`rbssh`. """ args = [self.executable_path] if port is not None: args.extend(['-p', six.text_type(port)]) if username is not None: args.extend(['-l', username]) if subsystem is not None: args.extend(['-s', host, subsystem]) else: args.extend([host] + command) return args vendor = RBSSHVendor() register_ssh_vendor('rbssh', vendor) register_default_ssh_vendor(vendor)
if m: self.local_site_name = m.group(1) base = base.replace(m.group(0), '') else: self.local_site_name = None super(RBRemoteSSHTransport, self).__init__(base, *args, **kwargs) def _build_medium(self): client_medium, auth = \ super(RBRemoteSSHTransport, self)._build_medium() client_medium._vendor = RBSSHVendor(self.local_site_name) return client_medium, auth vendor = RBSSHVendor() register_ssh_vendor("rbssh", vendor) register_default_ssh_vendor(vendor) sshutils.register_rbssh('BZR_SSH') register_lazy_transport('bzr+ssh://', 'reviewboard.scmtools.bzr', 'RBRemoteSSHTransport') # BZRTool: An interface to Bazaar SCM Tool (http://bazaar-vcs.org/) class BZRTool(SCMTool): name = "Bazaar" dependencies = { 'modules': ['bzrlib'], } # Timestamp format in bzr diffs.