Kiln » Dependencies » Dulwich Read More
Clone URL:  
Pushed to one repository · View In Graph Contained in master-1, master-0, and 0.9.4

Rename SSHVendor.connect_ssh to SSHVendor.run_command.

Changeset 4d3f610fccda

Parent fcd6aa89ee95

by Jelmer Vernooij

Changes to 4 files · Browse files at 4d3f610fccda Showing diff from parent fcd6aa89ee95 Diff from another changeset...

Change 1 of 1 Show Entire File NEWS Stacked
 
26
27
28
 
 
 
 
 
29
30
31
 
26
27
28
29
30
31
32
33
34
35
36
@@ -26,6 +26,11 @@
  (David Bennett)     * Add paramiko-based SSH vendor. (Aaron O'Mullan) + + API CHANGES + + * SSHVendor.connect_ssh has been renamed to SSHVendor.run_command. + (Jelmer Vernooij)    0.9.0 2013-05-31  
Change 1 of 4 Show Entire File dulwich/​client.py Stacked
 
639
640
641
642
 
643
644
645
 
650
651
652
653
 
654
655
656
657
658
659
 
660
661
662
 
756
757
758
759
 
760
761
762
 
793
794
795
796
 
797
798
799
 
639
640
641
 
642
643
644
645
 
650
651
652
 
653
654
655
656
657
658
 
659
660
661
662
 
756
757
758
 
759
760
761
762
 
793
794
795
 
796
797
798
799
@@ -639,7 +639,7 @@
 class SSHVendor(object):   """A client side SSH implementation."""   - def connect_ssh(self, host, command, username=None, port=None): + def run_command(self, host, command, username=None, port=None):   """Connect to an SSH server.     Run a command remotely and return a file-like object for interaction @@ -650,13 +650,13 @@
  :param username: Optional ame of user to log in as   :param port: Optional SSH port to use   """ - raise NotImplementedError(self.connect_ssh) + raise NotImplementedError(self.run_command)      class SubprocessSSHVendor(SSHVendor):   """SSH vendor that shells out to the local 'ssh' command."""   - def connect_ssh(self, host, command, username=None, port=None): + def run_command(self, host, command, username=None, port=None):   import subprocess   #FIXME: This has no way to deal with passwords..   args = ['ssh', '-x'] @@ -756,7 +756,7 @@
    class ParamikoSSHVendor(object):   - def connect_ssh(self, host, command, username=None, port=None, + def run_command(self, host, command, username=None, port=None,   progress_stderr=None, **kwargs):   client = paramiko.SSHClient()   @@ -793,7 +793,7 @@
  def _connect(self, cmd, path):   if path.startswith("/~"):   path = path[1:] - con = get_ssh_vendor().connect_ssh( + con = get_ssh_vendor().run_command(   self.host, ["%s '%s'" % (self._get_cmd_path(cmd), path)],   port=self.port, username=self.username)   return (Protocol(con.read, con.write, report_activity=self._report_activity),
 
262
263
264
265
 
266
267
268
 
262
263
264
 
265
266
267
268
@@ -262,7 +262,7 @@
   class TestSSHVendor(object):   @staticmethod - def connect_ssh(host, command, username=None, port=None): + def run_command(host, command, username=None, port=None):   cmd, path = command[0].replace("'", '').split(' ')   cmd = cmd.split('-', 1)   p = subprocess.Popen(cmd + [path], env=get_safe_env(), stdin=subprocess.PIPE,
 
386
387
388
389
 
390
391
392
 
386
387
388
 
389
390
391
392
@@ -386,7 +386,7 @@
  self.username = None   self.port = None   - def connect_ssh(self, host, command, username=None, port=None): + def run_command(self, host, command, username=None, port=None):   self.host = host   self.command = command   self.username = username