Merged r4422 from trunk.

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/1.0-stable@4423 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2010-11-21 14:26:01 +00:00
parent b5a409791c
commit faa461c66a
2 changed files with 14 additions and 8 deletions

View File

@@ -38,13 +38,13 @@ module Redmine
# release number (eg 0.9.5 or 1.0) or as a revision
# id composed of 12 hexa characters.
theversion = hgversion_from_command_line
if m = theversion.match(/\b\d+(\.\d+)+\b/)
m[0].split(".").collect(&:to_i)
if m = theversion.match(%r{\A(.*?)((\d+\.)+\d+)})
m[2].scan(%r{\d+}).collect(&:to_i)
end
end
def hgversion_from_command_line
%x{#{HG_BIN} --version}.lines.first.to_s
shellout("#{HG_BIN} --version") { |io| io.read }.to_s
end
def template_path