Module: Capistrano::Hg::DefaultStrategy

### Home Classes Methods

### In Files

- lib/capistrano/hg.rb

### Methods

- #check
- #clone
- #fetch_revision
- #release
- #test
- #update

### Files

- Capfile
- Capfile

### Class/Module Index

Quicksearch

- Capistrano
- Capistrano::Application
- Capistrano::Configuration
- Capistrano::Configuration::Filter
- Capistrano::Configuration::Question
- Capistrano::Configuration::Server
- Capistrano::Configuration::Server::Properties
- Capistrano::Configuration::Servers
- Capistrano::DSL
- Capistrano::DSL::Env
- Capistrano::DSL::Paths
- Capistrano::DSL::Stages
- Capistrano::Git
- Capistrano::Git::DefaultStrategy
- Capistrano::Hg
- Capistrano::Hg::DefaultStrategy
- Capistrano::SCM
- Capistrano::Svn
- Capistrano::Svn::DefaultStrategy
- Capistrano::TaskEnhancements
- Capistrano::UploadTask
- Capistrano::VersionValidator
- Object

No matching classes.

# Capistrano::Hg::DefaultStrategy

### Public Instance Methods

check() click to toggle source

    # File lib/capistrano/hg.rb, line 17
    def check
      hg "id", repo_url
    end

clone() click to toggle source

    # File lib/capistrano/hg.rb, line 21
    def clone
      hg "clone", "--noupdate", repo_url, repo_path
    end

fetch_revision() click to toggle source

    # File lib/capistrano/hg.rb, line 39
    def fetch_revision
      context.capture(:hg, "log --rev #{fetch(:branch)} --template \"{node}\n\"")
    end

release() click to toggle source

    # File lib/capistrano/hg.rb, line 29
    def release
      if tree = fetch(:repo_tree)
        tree = tree.slice %^/?(.*?)/?$#, 1
        components = tree.split('/').size
        hg "archive --type tgz -p . -I", tree, "--rev", fetch(:branch), "| tar -x --strip-components #{components} -f - -C", release_path
      else
        hg "archive", release_path, "--rev", fetch(:branch)
      end
    end

test() click to toggle source

    # File lib/capistrano/hg.rb, line 13
    def test
      test! " [ -d #{repo_path}/.hg ] "
    end

update() click to toggle source

    # File lib/capistrano/hg.rb, line 25
    def update
      hg "pull"
    end

[Validate]

Generated with the Darkfish Rdoc Generator 2.