title: Using expect to login into SVN
body: <p>I am trying to use an automated script, which would login to SVN, update my sources, create a tarball with these and scp them to a remote host.</p>
  
  <p>The problem here is that, for every login to SVN (even for checkout or update), we require to enter our password. Automation of password entry, the only way that I could find, was using expect to work on this. </p>
  
  <p>Is there any script in expect, which can take care of SVN and scp for detecting and giving the password to SVN and then to SCP?</p>
  
  <p>I am using the following:</p>
  
  <pre><code>spawn svn [lindex $argv 0]
  expect " password: $"
  send "$password\r"
  expect { 
      " password: $"    send "$password\r"
      "^At revision "
      "^Updated to revision "
  }
  </code></pre>
  
  <p>The password and up command i pass from the command line, but there is a security threat there if someone has access to the history. The answers mentioned below do not satisfy my pre-requisites, also i am not able to do an export for now [some other security concerns :-(]</p>