aboutsummaryrefslogtreecommitdiffstats
path: root/switchtower/lib
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-08-12 21:40:38 +0000
committerJamis Buck <jamis@37signals.com>2005-08-12 21:40:38 +0000
commit67f73c99dbd655c7ef6b71a0f0721902093ce855 (patch)
treefdcc17990d8e22a74f221902658ba91c3e43f809 /switchtower/lib
parent6500981d608a046305898fefdcebf293553468ae (diff)
downloadrails-67f73c99dbd655c7ef6b71a0f0721902093ce855.tar.gz
rails-67f73c99dbd655c7ef6b71a0f0721902093ce855.tar.bz2
rails-67f73c99dbd655c7ef6b71a0f0721902093ce855.zip
Subversion module recognizes the password prompt for HTTP authentication
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1997 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'switchtower/lib')
-rw-r--r--switchtower/lib/switchtower/scm/subversion.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/switchtower/lib/switchtower/scm/subversion.rb b/switchtower/lib/switchtower/scm/subversion.rb
index 79cb6aef8f..cc5d78c3e6 100644
--- a/switchtower/lib/switchtower/scm/subversion.rb
+++ b/switchtower/lib/switchtower/scm/subversion.rb
@@ -27,7 +27,8 @@ module SwitchTower
configuration.logger.debug "querying latest revision..." unless @latest_revision
repo = configuration.repository
until @latest_revision
- @latest_revision = latest_revision_at(repo)
+ match = svn_log(repo).scan(/r(\d+)/).first
+ @latest_revision = match ? match.first : nil
if @latest_revision.nil?
# if a revision number was not reported, move up a level in the path
# and try again.
@@ -55,7 +56,7 @@ module SwitchTower
actor.run(command) do |ch, stream, out|
prefix = "#{stream} :: #{ch[:host]}"
actor.logger.info out, prefix
- if out =~ /^Password:/
+ if out =~ /^Password.*:/
actor.logger.info "subversion is asking for a password", prefix
ch.send_data "#{actor.password}\n"
elsif out =~ %r{\(yes/no\)}
@@ -76,9 +77,8 @@ module SwitchTower
private
- def latest_revision_at(path)
- match = `svn log -q -rhead #{path}`.scan(/r(\d+)/).first
- match ? match.first : nil
+ def svn_log(path)
+ `svn log -q -rhead #{path}`
end
end