Sha256: 6a070bddbf3b99283a3824527e436b7d577e26c3535d856787acbc64ea40121b

Contents?: true

Size: 705 Bytes

Versions: 23

Compression:

Stored size: 705 Bytes

Contents

# frozen_string_literal: true

require_relative 'py_client'

module OhlohScm
  module PyBridge
    class HgClient < PyClient
      def initialize(repository_url)
        @repository_url = repository_url
        @py_script = "#{__dir__}/hg_server.py"
      end

      def cat_file(revision, file)
        send_command("CAT_FILE\t#{revision}\t#{file}")
      rescue RuntimeError => e
        raise unless e.message =~ /not found in manifest/ # File does not exist.
      end

      def parent_tokens(revision)
        send_command("PARENT_TOKENS\t#{revision}").split("\t")
      end

      private

      def open_repository
        send_command("REPO_OPEN\t#{@repository_url}")
      end
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
ohloh_scm-4.0.4 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-4.0.3 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-4.0.2 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-4.0.1 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.21 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.19 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.17 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.16 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.15 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.14 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.13 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.12 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.11 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.10 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.9 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.8 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.7 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.6 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.5 lib/ohloh_scm/py_bridge/hg_client.rb
ohloh_scm-3.0.4 lib/ohloh_scm/py_bridge/hg_client.rb