Fix several problems with rbssh

Review Request #2105 — Created Feb. 6, 2011 and submitted

Information

Review Board
release-1.5.x

Reviewers

This fixes several problems with rbssh on Windows and Linux.

rbssh had problems with some types of repositories. Mostly, they expected
certain command line options to be available that weren't. We now support
-q/--quiet, -s (for subsystem selection), and -V (print version).

In general, the rbssh code has been cleaned up to be a bit better structured
and less hacky. We have classes for Posix and Windows, rather than
individual functions. We also now tell OptionParser to leave behind any
unknown arguments so that we can pass them to the command to run on the
other server.

rbssh now supports a shell and sftp. If a valid key or password wasn't
available during authentication, we prompt for a new password. We do this
three times before giving up.

On Windows, the process was hanging around forever instead of properly
shutting down. We now let stdin processing drive in the main thread and
then, upon closing, we trigger a shutdown of the writer, which should
close the other end and shut down the process.

This also improves our logging situation by using the standard Python
logging module instead of our own debug() function.
With the other changes I have up, SSH worked on both Windows and Linux
for all supported types of repositories.
david
  1. You have a typo in the second sentence of your description.
  2. reviewboard/cmdline/rbssh.py (Diff revision 1)
     
     
    Can you either eliminate this or annotate it with a real comment? Same below.
  3. reviewboard/cmdline/rbssh.py (Diff revision 1)
     
     
    This shouldn't be here, should it?
  4. 
      
chipx86
Review request changed

Change Summary:

* Removed some commented out logging statements.
* Fixed a typo in the change description.
* Removed the "EOF" output.

Description:

   

This fixes several problems with rbssh on Windows and Linux.

   
~  

rbssh had problems wit some types of repositories. Mostly, they expected

  ~

rbssh had problems with some types of repositories. Mostly, they expected

    certain command line options to be available that weren't. We now support
    -q/--quiet, -s (for subsystem selection), and -V (print version).

   
   

In general, the rbssh code has been cleaned up to be a bit better structured

    and less hacky. We have classes for Posix and Windows, rather than
    individual functions. We also now tell OptionParser to leave behind any
    unknown arguments so that we can pass them to the command to run on the
    other server.

   
   

rbssh now supports a shell and sftp. If a valid key or password wasn't

    available during authentication, we prompt for a new password. We do this
    three times before giving up.

   
   

On Windows, the process was hanging around forever instead of properly

    shutting down. We now let stdin processing drive in the main thread and
    then, upon closing, we trigger a shutdown of the writer, which should
    close the other end and shut down the process.

   
   

This also improves our logging situation by using the standard Python

    logging module instead of our own debug() function.

Diff:

Revision 2 (+207 -115)

Show changes

david
  1. Ship It!
  2. 
      
Loading...