module Mercurial::Helper
Public Instance Methods
hg(cmd, options={})
click to toggle source
# File lib/mercurial-ruby/helper.rb, line 5 def hg(cmd, options={}) repository.shell.hg(cmd, options) end
hg_to_array(cmd, options={}, cmd_options={}, &block)
click to toggle source
# File lib/mercurial-ruby/helper.rb, line 13 def hg_to_array(cmd, options={}, cmd_options={}, &block) separator = options[:separator] || "\n" [].tap do |returning| hg(cmd, cmd_options).split(separator).each do |line| returning << block.call(line) end end.compact end
shell(cmd, options={})
click to toggle source
# File lib/mercurial-ruby/helper.rb, line 9 def shell(cmd, options={}) repository.shell.run(cmd, options) end