Class: Capistrano::Deploy::SCM::Darcs

Class | Capistrano::Deploy::SCM::Darcs
In: | lib/capistrano/recipes/deploy/scm/darcs.rb
Parent: | Base

Implements the Capistrano SCM interface for the darcs revision control system (www.abridgegame.org/darcs/).

### Methods

checkout diff export head log query_revision sync to_match

### Public Instance methods

checkout(revision, destination)

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’.

diff(from, to=nil)

Returns the command that will do a "darcs diff" for the two revisions. Each revision must be the ‘hash’ identifier of a darcs revision.

export(revision, destination)

Darcs does not have a real ‘export’ option; there is ‘darcs dist’, but that presupposes a utility that can untar and ungzip the dist file. We‘ll cheat and just do a get, followed by a deletion of the _darcs metadata directory.

head()

Because darcs does not have any support for pseudo-ids, we‘ll just return something here that we can use in the helpers below for determining whether we need to look up the latest revision.

log(from, to=nil)

Returns the log of changes between the two revisions. Each revision must be the ‘hash’ identifier of a darcs revision.

query_revision(revision) {|scm(:changes, "--last 1", "--xml-output", "--repo=| ...}

Attempts to translate the given revision identifier to a "real" revision. If the identifier is a symbol, it is assumed to be a pseudo-id. Otherwise, it will be immediately returned. If it is a pseudo-id, a set of commands to execute will be yielded, and the result of executing those commands must be returned by the block. This method will then extract the actual revision hash from the returned data.

sync(revision, destination)

Tries to update the destination repository in-place, to bring it up to the given revision. Note that because darcs’ "pull" operation does not support a "to-match" argument (or similar), this basically nukes the destination directory and re-gets it.

to_match(revision)

[Validate]