I've been thinking long and hard about this. It's definitely a move
in the right direction, but I think it needs to be approached
differently, which is why I haven't added this to trunk yet.
My current thinking is this: sometime after the next release of
capistrano (which will be Real Soon Now), I'd like to decouple the
deployment method from the SCM. Currently, the two are too tightly
coupled, which requires people to jump through lots of hoops to
separate them.
What I'm thinking is that each SCM module would simply become
something that could be queried for the instructions needed to
execute some task. For example, something like the following pseudo-
code:
svn = SCM::Subversion.new(config)
p svn.checkout #-> "svn co -r1234 svn+ssh://foo.bar.com/svn/trunk /
u/apps/foo/releases/12345"
p svn.export #-> "svn export -r1234 svn+ssh://foo.bar.com/svn/
trunk /u/apps/foo/releases/12345"
Then, the deployment method can be decoupled from the SCM:
set :scm, :subversion
# set :scm, :darcs
# set :scm, :baz
# etc.
set :deploy_via, :checkout
# set :deploy_via, :export
# set :deploy_via, :copy
# set :deploy_via, :rsync
# etc.
The important thing is to make sure a record is kept (consistently)
on the server of what the currently deployed revision is, so that
features like "diff_from_last_deploy" still work.
I'll probably start working on that refactoring sometime after
Christmas.
- Jamis
On Dec 6, 2006, at 10:52 PM, wolfmanjm wrote:
I'd like to announce a new subversion SCM module for Capistrano.
In addition to all the old functionality, it adds three new features.
1. Handles the subversion repository only being accessible from the
local machine
2. Handles the subversion repository URL being different on local host
and remote server
3. Handles different paths to svn binary on local host and remote
server
Details of this module can be read here:
http://blog.wolfman.com/articles/2006/12/06/a-capistrano-scm-module-
for-local-svn-access
I will also upload the file to this group (if it allows me to).
The file includes an extended subversion_test.rb for unit testing.
This version is Beta, please test if you have a need for its
functionality.
Jamis... You are welcome to replace the current scm/subversion.rb with
this one if you like (hint, hint ;)
>
--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---