scm: mercurial: replace identifier to hgrev(identifier).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4667 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
ed246cef41
commit
08c093bc85
|
@ -81,7 +81,7 @@ module Redmine
|
||||||
path ||= ''
|
path ||= ''
|
||||||
entries = Entries.new
|
entries = Entries.new
|
||||||
cmd = "#{HG_BIN} -R #{target('')} --cwd #{target('')} locate"
|
cmd = "#{HG_BIN} -R #{target('')} --cwd #{target('')} locate"
|
||||||
cmd << " -r " + shell_quote(identifier ? identifier.to_s : "tip")
|
cmd << " -r #{hgrev(identifier)}"
|
||||||
cmd << " " + shell_quote("path:#{path}") unless path.empty?
|
cmd << " " + shell_quote("path:#{path}") unless path.empty?
|
||||||
shellout(cmd) do |io|
|
shellout(cmd) do |io|
|
||||||
io.each_line do |line|
|
io.each_line do |line|
|
||||||
|
@ -108,9 +108,9 @@ module Redmine
|
||||||
revisions = Revisions.new
|
revisions = Revisions.new
|
||||||
cmd = "#{HG_BIN} --debug --encoding utf8 -R #{target('')} log -C --style #{shell_quote self.class.template_path}"
|
cmd = "#{HG_BIN} --debug --encoding utf8 -R #{target('')} log -C --style #{shell_quote self.class.template_path}"
|
||||||
if identifier_from && identifier_to
|
if identifier_from && identifier_to
|
||||||
cmd << " -r #{identifier_from.to_i}:#{identifier_to.to_i}"
|
cmd << " -r #{hgrev(identifier_from)}:#{hgrev(identifier_to)}"
|
||||||
elsif identifier_from
|
elsif identifier_from
|
||||||
cmd << " -r #{identifier_from.to_i}:"
|
cmd << " -r #{hgrev(identifier_from)}:"
|
||||||
end
|
end
|
||||||
cmd << " --limit #{options[:limit].to_i}" if options[:limit]
|
cmd << " --limit #{options[:limit].to_i}" if options[:limit]
|
||||||
cmd << " #{shell_quote path}" unless path.blank?
|
cmd << " #{shell_quote path}" unless path.blank?
|
||||||
|
@ -173,7 +173,7 @@ module Redmine
|
||||||
|
|
||||||
def cat(path, identifier=nil)
|
def cat(path, identifier=nil)
|
||||||
cmd = "#{HG_BIN} -R #{target('')} cat"
|
cmd = "#{HG_BIN} -R #{target('')} cat"
|
||||||
cmd << " -r " + shell_quote(identifier ? identifier.to_s : "tip")
|
cmd << " -r #{hgrev(identifier)}"
|
||||||
cmd << " #{target(path)}"
|
cmd << " #{target(path)}"
|
||||||
cat = nil
|
cat = nil
|
||||||
shellout(cmd) do |io|
|
shellout(cmd) do |io|
|
||||||
|
|
Loading…
Reference in New Issue