Sha256: 230eb61a948c903b8440d367c50f0812bad5840a81ea3fa6490aee304e8f3809

Contents?: true

Size: 685 Bytes

Versions: 5

Compression:

Stored size: 685 Bytes

Contents

load File.expand_path("../tasks/hg.rake", __FILE__)

require 'capistrano/scm'

class Capistrano::Hg < Capistrano::SCM
  # execute hg in context with arguments
  def hg(*args)
    args.unshift(:hg)
    context.execute *args
  end

  module DefaultStrategy
    def test
      test! " [ -d #{repo_path}/.hg ] "
    end

    def check
      hg "id", repo_url
    end

    def clone
      hg "clone", "--noupdate", repo_url, repo_path
    end

    def update
      hg "pull"
    end

    def release
      hg "archive", release_path, "--rev", fetch(:branch)
    end

    def fetch_revision
      context.capture(:hg, "log --rev #{fetch(:branch)} --template \"{node}\n\"")
    end
  end
end

Version data entries

5 entries across 3 versions & 2 rubygems

Version Path
honeybadger-2.4.0 vendor/gems/ruby/1.9.1/gems/capistrano-3.2.1/lib/capistrano/hg.rb
honeybadger-2.4.0 vendor/gems/ruby/2.1.0/gems/capistrano-3.2.1/lib/capistrano/hg.rb
honeybadger-2.4.0 vendor/gems/ruby/2.2.0/gems/capistrano-3.2.1/lib/capistrano/hg.rb
capistrano-3.2.1 lib/capistrano/hg.rb
capistrano-3.2.0 lib/capistrano/hg.rb