mirror of
https://github.com/redmine/redmine.git
synced 2026-05-07 04:57:26 +02:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user