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:
Toshi MARUYAMA 2011-01-09 09:54:30 +00:00
parent ed246cef41
commit 08c093bc85
1 changed files with 16 additions and 16 deletions

View File

@ -81,7 +81,7 @@ module Redmine
path ||= ''
entries = Entries.new
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?
shellout(cmd) do |io|
io.each_line do |line|
@ -108,9 +108,9 @@ module Redmine
revisions = Revisions.new
cmd = "#{HG_BIN} --debug --encoding utf8 -R #{target('')} log -C --style #{shell_quote self.class.template_path}"
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
cmd << " -r #{identifier_from.to_i}:"
cmd << " -r #{hgrev(identifier_from)}:"
end
cmd << " --limit #{options[:limit].to_i}" if options[:limit]
cmd << " #{shell_quote path}" unless path.blank?
@ -173,7 +173,7 @@ module Redmine
def cat(path, identifier=nil)
cmd = "#{HG_BIN} -R #{target('')} cat"
cmd << " -r " + shell_quote(identifier ? identifier.to_s : "tip")
cmd << " -r #{hgrev(identifier)}"
cmd << " #{target(path)}"
cat = nil
shellout(cmd) do |io|