Fixed: r4417 breaks MercurialAdapter with ruby 1.8.6 (#5117).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4422 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang committed 2010-11-21 14:25:26 +00:00
1 parent 77c6188ec2
commit cfc3ee4f5a
2 files changed
+14 -8

No files matched your search

@@ -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