Skip to content
Browse files

Changes to pass the test in the previous commit

  • Loading branch information...
1 parent ab86cc9 commit f74957f3c764f5e76b4195e040c004d8f7184412 zander committed with leehambley
Showing with 12 additions and 1 deletion.
  1. +12 −1 lib/capistrano/recipes/deploy/scm/darcs.rb
13 lib/capistrano/recipes/deploy/scm/darcs.rb
@@ -18,11 +18,22 @@ def head
+ def to_match(revision)
+ if revision.nil? || revision == self.head
+ nil
+ else
+ "--to-match='hash #{revision}'"
+ end
+ end
# Returns the command that will check out the given revision to the
# given destination. The 'revision' parameter must be the 'hash' value
# for the revision in question, as given by 'darcs changes --xml-output'.
def checkout(revision, destination)
- scm :get, verbose, "--repo-name=#{destination}", "--to-match='hash #{revision}'", repository
+ scm :get, *[verbose,
+ "--repo-name=#{destination}",
+ to_match(revision),
+ repository].compact
# Tries to update the destination repository in-place, to bring it up

0 comments on commit f74957f

Please sign in to comment.
Something went wrong with that request. Please try again.