mirror of
https://github.com/capistrano/capistrano
synced 2023-03-27 23:21:18 -04:00
Better support for key passphrases in the SVN module (closes #5920) [llasram@gmail.com]
git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@4827 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
8208667f0f
commit
13e64d5d04
2 changed files with 9 additions and 3 deletions
|
@ -1,5 +1,7 @@
|
|||
*SVN*
|
||||
|
||||
* Better support for key passphrases in the SVN module (closes #5920) [llasram@gmail.com]
|
||||
|
||||
* Fix missing default for :local in cvs.rb (closes #3645) [jeremy@hinegardner.org]
|
||||
|
||||
* Fix awkward spacing in gemspec file (closes #3888) [grant@antiflux.org]
|
||||
|
|
|
@ -94,6 +94,10 @@ module Capistrano
|
|||
configuration[:svn_password] || configuration[:password]
|
||||
end
|
||||
|
||||
def svn_passphrase
|
||||
configuration[:svn_passphrase] || svn_password
|
||||
end
|
||||
|
||||
def svn_stream_handler(actor)
|
||||
Proc.new do |ch, stream, out|
|
||||
prefix = "#{stream} :: #{ch[:host]}"
|
||||
|
@ -105,10 +109,10 @@ module Capistrano
|
|||
actor.logger.info "subversion is asking whether to connect or not",
|
||||
prefix
|
||||
ch.send_data "yes\n"
|
||||
elsif out =~ %r{passphrase}
|
||||
message = "subversion needs your key's passphrase, sending empty string"
|
||||
elsif out =~ %r{passphrase}i
|
||||
message = "subversion needs your key's passphrase"
|
||||
actor.logger.info message, prefix
|
||||
ch.send_data "\n"
|
||||
ch.send_data "#{svn_passphrase}\n"
|
||||
elsif out =~ %r{The entry \'(\w+)\' is no longer a directory}
|
||||
message = "subversion can't update because directory '#{$1}' was replaced. Please add it to svn:ignore."
|
||||
actor.logger.info message, prefix
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue