Patch #5117 » mercurial_adapter_1.8.6fix.patch
lib/redmine/scm/adapters/mercurial_adapter.rb | ||
---|---|---|
44 | 44 |
end |
45 | 45 |
|
46 | 46 |
def hgversion_from_command_line |
47 |
%x{#{HG_BIN} --version}.lines.first.to_s
|
|
47 |
%x{#{HG_BIN} --version} |
|
48 | 48 |
end |
49 | 49 |
|
50 | 50 |
def template_path |
test/unit/lib/redmine/scm/adapters/mercurial_adapter_test.rb | ||
---|---|---|
17 | 17 |
"Mercurial Distributed SCM (1.0.1+20080525)\n" => [1,0,1], |
18 | 18 |
"Mercurial Distributed SCM (1916e629a29d)\n" => nil, |
19 | 19 |
"Mercurial SCM Distribuito (versione 0.9.5)\n" => [0,9,5]} |
20 |
trailing_text = <<-EOT.gsub /^ +/, '' |
|
21 |
(see http://mercurial.selenic.com for more information) |
|
22 | ||
23 |
Copyright (C) 2005-2010 Matt Mackall and others |
|
24 |
This is free software; see the source for copying conditions. There is NO |
|
25 |
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
|
26 |
EOT |
|
20 | 27 |
|
21 | 28 |
to_test.each do |s, v| |
22 |
test_hgversion_for(s, v) |
|
29 |
test_hgversion_for(s + trailing_text, v)
|
|
23 | 30 |
end |
24 | 31 |
end |
25 | 32 |
|