Cap: deploy with "svn info" that doesn't know --username?

Hi all

Sadly my hoster uses an old version of Subversion whose “info” command
doesn’t know the --username argument:

[email protected] [~/railsapps/shop]# cap deploy:update

  • executing `deploy:update’
    ** transaction: start
  • executing `deploy:update_code’
    Subcommand ‘info’ doesn’t accept option ‘–username arg’
    Type ‘svn help info’ for usage.
    *** [deploy:update_code] rolling back
  • executing “rm -rf
    /home/incensec/railsapps/cap/shop/releases/20081016194121; true”
    servers: [“incense.ch”]
    Password:
    [incense.ch] executing command
    *** [err :: incense.ch] stdin: is not a tty
    command finished
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/scm/subversion.rb:58:in
    query_revision': tried to run svn info
    https://svn.xp-dev.com/svn/incense_shop/trunk/ --username incense
    –password --no-auth-cache -rHEAD’ and got unexpected result “”
    (RuntimeError)
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in
    send' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in method_missing’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/scm/base.rb:63:in
    local' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in method_missing’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:37:in
    load' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:87:in call’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:87:in
    fetch' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:110:in protect’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:110:in
    synchronize' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:110:in protect’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:78:in
    fetch' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:95:in []’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/strategy/base.rb:64:in
    revision' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/strategy/checkout.rb:14:in command’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/strategy/remote.rb:15:in
    deploy!' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:197:in load’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:128:in
    instance_eval' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:128:in invoke_task_directly_without_callbacks’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/callbacks.rb:27:in
    invoke_task_directly' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:81:in execute_task’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/namespaces.rb:186:in
    send' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/namespaces.rb:186:in method_missing’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/namespaces.rb:104:in
    update_code' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:178:in load’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:48:in
    transaction' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/namespaces.rb:186:in send’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/namespaces.rb:186:in
    method_missing' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:177:in load’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:128:in
    instance_eval' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:128:in invoke_task_directly_without_callbacks’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/callbacks.rb:27:in
    invoke_task_directly' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:81:in execute_task’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:93:in
    find_and_execute_task' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:45:in execute_requested_actions_without_help’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:44:in
    each' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:44:in execute_requested_actions_without_help’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/help.rb:19:in
    execute_requested_actions' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:33:in execute!’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:14:in
    execute' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/bin/cap:4 from /usr/bin/cap:19:in load’
    from /usr/bin/cap:19
    [email protected] [~/railsapps/shop]#

I tried it using an explicit revision number (I’ve read that should work
somewhere on google), but still I’m having problems:

[email protected] [~/railsapps/shop]# cap deploy:update -s revision=10

  • executing `deploy:update’
    ** transaction: start
  • executing `deploy:update_code’
    Subcommand ‘info’ doesn’t accept option ‘–username arg’
    Type ‘svn help info’ for usage.
    *** [deploy:update_code] rolling back
  • executing “rm -rf
    /home/incensec/railsapps/cap/shop/releases/20081020145106; true”
    servers: [“incense.ch”]
    Password:
    ** [deploy:update_code] exception while rolling back:
    Capistrano::ConnectionError, connection failed for: incense.ch
    (Net::SSH::AuthenticationFailed: incensec)
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/scm/subversion.rb:58:in
    query_revision': tried to run svn info
    https://svn.xp-dev.com/svn/incense_shop/trunk/ --username incense
    –password --no-auth-cache -r10’ and got unexpected result “”
    (RuntimeError)
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in
    send' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in method_missing’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/scm/base.rb:63:in
    local' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/scm/base.rb:35:in method_missing’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:37:in
    load' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:87:in call’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:87:in
    fetch' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:110:in protect’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:110:in
    synchronize' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:110:in protect’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:78:in
    fetch' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/variables.rb:95:in []’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/strategy/base.rb:64:in
    revision' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/strategy/checkout.rb:14:in command’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy/strategy/remote.rb:15:in
    deploy!' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:197:in load’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:128:in
    instance_eval' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:128:in invoke_task_directly_without_callbacks’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/callbacks.rb:27:in
    invoke_task_directly' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:81:in execute_task’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/namespaces.rb:186:in
    send' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/namespaces.rb:186:in method_missing’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/namespaces.rb:104:in
    update_code' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:178:in load’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:48:in
    transaction' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/namespaces.rb:186:in send’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/namespaces.rb:186:in
    method_missing' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/recipes/deploy.rb:177:in load’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:128:in
    instance_eval' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:128:in invoke_task_directly_without_callbacks’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/callbacks.rb:27:in
    invoke_task_directly' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:81:in execute_task’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/configuration/execution.rb:93:in
    find_and_execute_task' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:45:in execute_requested_actions_without_help’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:44:in
    each' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:44:in execute_requested_actions_without_help’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/help.rb:19:in
    execute_requested_actions' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:33:in execute!’
    from
    /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/lib/capistrano/cli/execute.rb:14:in
    execute' from /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.0/bin/cap:4 from /usr/bin/cap:19:in load’
    from /usr/bin/cap:19
    [email protected] [~/railsapps/shop]#

anyone got an idea? Thanks, Josh

Hey Josh,

Think your problem is 2 fold:

First,

Subcommand ‘info’ doesn’t accept option ‘–username arg’
Type ‘svn help info’ for usage.
*** [deploy:update_code] rolling back

Think your version of the client doesn’t support passing the username
arg for the “info” command. If you run “svn --version” it should tell
you the version.

–password --no-auth-cache -rHEAD’ and got unexpected result “”
(RuntimeError)

The problem here is the log line " stdin: is not a tty". If you look
at the svn command, its will end up expecting a Password to be input.
Don’t think you’ve added that.

BTW, be careful posting logs on public forums - don’t really want to
accidentally divulge sensitive info (like passwords!)

HTH! :slight_smile:

Roopinder.

On Oct 21, 11:04 pm, Joshua M. [email protected]