Permalink
Browse files

If subversion asks for a password, prompt as a last resort (closes #9…

…885)

git-svn-id: http://svn.rubyonrails.org/rails/tools/capistrano@8754 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 9175098 commit 9e2de79a384bf5bf7be236f71b06b6d4281efa61 @jamis jamis committed Jan 30, 2008
Showing with 9 additions and 1 deletion.
  1. +2 −0 CHANGELOG
  2. +7 −1 lib/capistrano/recipes/deploy/scm/subversion.rb
View
2 CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* If subversion asks for a password, prompt as a last resort [Jamis Buck]
+
* Use checkout --lightweight for bzr checkout, instead of branch [michiels]
* Make sure bzr SCM works when revision is head (or unspecified) [michiels]
View
8 lib/capistrano/recipes/deploy/scm/subversion.rb
@@ -72,7 +72,7 @@ def handle_data(state, stream, text)
case text
when /\bpassword.*:/i
# subversion is prompting for a password
- "#{variable(:scm_password) || variable(:password)}\n"
+ "#{scm_password_prompt}\n"
when %r{\(yes/no\)}
# subversion is asking whether or not to connect
"yes\n"
@@ -107,6 +107,12 @@ def authentication
def verbose
variable(:scm_verbose) ? nil : "-q"
end
+
+ def scm_password_prompt
+ @scm_password_prompt ||= variable(:scm_password) ||
+ variable(:password) ||
+ Capistrano::CLI.password_prompt("Subversion password: ")
+ end
end
end

0 comments on commit 9e2de79

Please sign in to comment.