Hi,
As far as I can tell, since I upgraded from 1.2 to 1.3.2, the
Vlad::Subversion#export method doesn't work like it used to (and should, IMHO).
Basically, since I upgraded, whenever I do a deploy, it updates the scm_path, but ALSO exports from the MASTER svn repo
(not the scm_path folder)! It totally bypasses the point of a local scm folder, which is why I love Vlad.
Here's the big change from History.txt:
1.3.0 / 2009-03-04
* Parameterized ‘head’ into ‘revision’ variable (with head as default).
Before, `remote_task :update` used to do this:
run "#{source.export ".", release_path}"
Now, it does this:
run "#{source.export revision, release_path}"
This poses a big problem, because the export function inside subversion.rb looks like:
def export(revision_or_source, destination)
"#{svn_cmd} #{deploy_via} " +
if revision_or_source =~ /^(\d+|head)$/i then
"-r #{revision_or_source} #{repository} #{destination}"
else
"#{revision_or_source} #{destination}"
end
end
When `revision_or_source` used to be ".", it exported from the local directory.
Now, it ALWAYS exports from the repo, since `svn export -r...` hits the repo, not the local scm_path. And since `revision`
by default == 'head', it will always take the first if branch.
I have attached my patch from `git format-patch`, along with the patch for the test.
My reasoning is thus: if you provide a revision (be it the default 'head' or something else), it should update the scm_path
with that revision. All export should ever do is export from the scm_path, and NEVER touch the MASTER svn repository.
Let me know what you think, and keep up the good work!
|