Project

General

Profile

Patch #5117 » hg-lang-c.patch

Toshi MARUYAMA, 2010-03-18 18:23

View differences:

lib/redmine/scm/adapters/mercurial_adapter.rb
TEMPLATE_EXTENSION = "tmpl"
class << self
def shellout(cmd, &block)
orig_lang = ENV['LANG']
ENV['LANG'] = 'C'
super(cmd, &block)
ENV['LANG'] = orig_lang
end
def client_version
@@client_version ||= (hgversion || [])
end
......
end
def hgversion_from_command_line
%x{#{HG_BIN} --version}.match(/\(version (.*)\)/)[1]
# %x{#{HG_BIN} --version}.match(/\(version (.*)\)/)[1]
ver = ""
cmd = "#{HG_BIN} --version"
shellout(cmd) do |io|
str = io.gets.chomp
if ( str =~ /version/ )
ver = str.match(/\(version (.*)\)/)[1]
break
end
end
return "" if $? && $?.exitstatus != 0
ver
end
def template_path
(3-3/13)