Sha256: f02787e544e8fafb171147c6a33deb7869581d738d4713fbec6f7aa5778d8dcc

Contents?: true

Size: 845 Bytes

Versions: 4

Compression:

Stored size: 845 Bytes

Contents

# frozen_string_literal: true

# tau hg pull
module HgPull
  # Backend method for hg pull.
  # rubocop:disable Metrics/MethodLength
  def hg_pull
    log.debug 'Pull hg repos'

    return false unless configured? %w[project_root_dir]

    unless git_check_hg
      log.error 'Not on git hg branch'
      return false
    end

    unless git_check_clean
      log.error 'No clean git workspace'
      return false
    end

    unless git_lib_pull_workspace
      log.error 'Unable to pull git workspace'
      return false
    end

    log.info _hg_pull_hg_pull_repos
    true
  end
  # rubocop:enable Metrics/MethodLength

  private

  # Pull hg repos.
  def _hg_pull_hg_pull_repos
    cmd_hg_pull_repos = format(
      config.active['cmd_hg_pull_repos'],
      root: config.active['project_root_dir']
    )

    run cmd_hg_pull_repos
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
takeltau-0.36.1 lib/takeltau/hg/pull.rb
takeltau-0.35.18 lib/takeltau/hg/pull.rb
takeltau-0.35.15 lib/takeltau/hg/pull.rb
takeltau-0.35.14 lib/takeltau/hg/pull.rb