[TxMt] subversion bundle, handling SSL keys with passwords

Daniel Harple dharple at generalconsumption.org
Mon Sep 4 20:19:40 UTC 2006

On Sep 4, 2006, at 9:44 PM, Allan Odgaard wrote:

> The actions in the Subversion bundle are all calling the svn  
> executable and parsing the output. The commands would need to parse  
> the request for the password, use something like CocoaDialog to  
> prompt the user, and then give that back to svn.
> While I imagine such thing would be fragile, it should be possible.

Look in to using /usr/bin/expect if you would like to do that. There  
is a [ruby library][1] to do it as well:

require "pty"
require "expect"

PTY.spawn("svn command…") do |read, write, pid|
   read.expect(/password: /, 0.1) do # timeout of 0.1 seconds
     pass = prompt_for_password()

[1]: http://ruby-doc.org/stdlib/libdoc/pty/rdoc/index.html

-- Daniel

More information about the textmate mailing list