In lib/capistrano/recipes/deploy/strategy/copy.rb, the deploy! method does five things:
- checks out the specified code revision (or updates the local cache) - copies the code tree to a tmp dir - creates a tarball from the temp tree - uploads the tarball to the remote nodes - unrolls that tarblal on the remote node In step 2, the code is not actually copied to the temp dir, but rather created using a series of hard links to the files in the original code checkout or local cache. I'm guessing that this was done to conserve disk space? Now, I've recently proposed some changes that facilitate callbacks earlier in the deploy process [1] as I want to process the code before creating the tarball to upload (eg. packing js + css, tweaking some config files, etc.). Because of the hard links this means that the code cache is no longer a pristine copy of the SCM tree, ie. it has local modifications and updating from the repo either doesn't restore any changed files or creates a conflict if remote changes can not be merged causing the deploy to abort. There are a few fixes I can think of: 1. copy the code from the SCM checkout into the tmp dir, rather than creating hard links 2. don't use a cache - checkout clean every time 3. do a recursive "revert" to clear any local changes before updating Anyone got any thoughts on this? R. [1] https://github.com/capistrano/capistrano/pull/9 -- "Feed that ego and you starve the soul" - Colonel J.D. Wilkes http://www.theshackshakers.com/ -- * You received this message because you are subscribed to the Google Groups "Capistrano" group. * To post to this group, send email to [email protected] * To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/capistrano?hl=en
