1
0
Fork 0
mirror of https://github.com/capistrano/capistrano synced 2023-03-27 23:21:18 -04:00

Fix GH #40. Use svn switch rather than svn update

This commit is contained in:
Johannes Barre 2011-09-24 16:14:18 +02:00 committed by Lee Hambley
parent bec746ef05
commit 4f40127ed2
2 changed files with 9 additions and 1 deletions

View file

@ -27,7 +27,7 @@ module Capistrano
# Returns the command that will do an "svn update" to the given
# revision, for the working copy at the given destination.
def sync(revision, destination)
scm :update, arguments, arguments(:update), verbose, authentication, "-r#{revision}", destination
scm :switch, arguments, verbose, authentication, "-r#{revision}", repository, destination
end
# Returns the command that will do an "svn export" of the given revision

View file

@ -29,4 +29,12 @@ Last Changed Date: 2009-03-11 11:04:25 -0700 (Wed, 11 Mar 2009)
end
assert_equal 2095, revision
end
def test_sync
@config[:repository] = "http://svn.github.com/capistrano/capistrano.git"
rev = '602'
dest = "/var/www"
assert_equal "svn switch -q -r602 http://svn.github.com/capistrano/capistrano.git /var/www", @source.sync(rev, dest)
end
end