class OhlohScm::PyBridge::HgClient

Public Class Methods

new(repository_url) click to toggle source
# File lib/ohloh_scm/py_bridge/hg_client.rb, line 8
def initialize(repository_url)
  @repository_url = repository_url
  @py_script = "#{__dir__}/hg_server.py"
end

Public Instance Methods

cat_file(revision, file) click to toggle source
# File lib/ohloh_scm/py_bridge/hg_client.rb, line 13
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
parent_tokens(revision) click to toggle source
# File lib/ohloh_scm/py_bridge/hg_client.rb, line 19
def parent_tokens(revision)
  send_command("PARENT_TOKENS\t#{revision}").split("\t")
end

Private Instance Methods

open_repository() click to toggle source
# File lib/ohloh_scm/py_bridge/hg_client.rb, line 25
def open_repository
  send_command("REPO_OPEN\t#{@repository_url}")
end