Anyone using Capistrano with darcs? I'm trying to deploy to a new
server and not having any luck.
I've copied the darcs repository to a directory on the server. When
cap is trying to get the list of patches from the repository, it can't
find it, so darcs fails with the error "Not a repository."
Here's my deploy.rb:
set :application, "myapp"
set :repository, "/home/myapp/darcs/myapp"
# If you aren't deploying to /u/apps/#{application} on the target
# servers (which is the default), you can specify the actual
location
# via the :deploy_to variable:
set :deploy_to, "/home/myapp/deploy"
# If you aren't using Subversion to manage your source code,
specify
# your SCM below:
set :scm, :darcs
set :scm_verbose, false
set :deploy_via, :checkout
set :user, 'myapp'
role :app, "myapp.com"
role :web, "myapp.com"
role :db, "myapp.com", :primary => true
And here's a log of my shell session:
me@desktop:~/myapp$ cap deploy:cold
* executing `deploy:cold'
* executing `deploy:update'
** transaction: start
* executing `deploy:update_code'
darcs failed: Not a repository: /home/myapp/darcs/myapp (/home/
myapp/darcs/myapp/_darcs/inventory: openBinaryFile: does not exist (No
such file or directory))
* executing "darcs get --repo-name=/home/myapp/deploy/releases/
20070816172442 --to-match='hash ' /home/myapp/darcs/myapp && (echo > /
home/myapp/deploy/releases/20070816172442/REVISION)"
servers: ["myapp.com"]
[myapp.com] executing command
Copying patch 1 of 225...
Copying patch 2 of 225...
Copying patch 3 of 225...
<...snip...>
Copying patch 225 of 225... done!
** [out] darcs:
** [out] Couldn't find patch matching "hash "
** [out]
command finished
*** [deploy:update_code] rolling back
* executing "rm -rf /home/myapp/deploy/releases/20070816172442;
true"
servers: ["myapp.com"]
[myapp.com] executing command
command finished
command "darcs get --repo-name=/home/myapp/deploy/releases/
20070816172442 --to-match='hash ' /home/myapp/darcs/myapp && (echo > /
home/myapp/deploy/releases/20070816172701/REVISION)" failed on
myapp.com
If that's not an option, you might want to consider using the :copy
strategy, instead.
- Jamis
Another problem, however: cap freezes while uploading the gzipped
copy of the code. The last thing cap prints to the screen is:
** uploading data to mysite.com:/tmp/20070816195756.tar.gz
Then it does nothing until I kill it. If I log in to the server,
there's a file at /tmp/20070816195756.tar.gz with zero bytes. Could
this be some obscure bug in Ruby's SFTP library?
Thanks,
-Stuart
In the meantime, I believe some on this list have written custom
strategies to work around that bug... anyone want to chime in here?