##// END OF EJS Templates
scm: mercurial: drop supporting below Mercurial 1.1 (#9465)...
Toshi MARUYAMA -
r7530:81ef038587ae
parent child
Show More
@@ -47,7 +47,7 module Redmine
47 end
47 end
48
48
49 def client_available
49 def client_available
50 client_version_above?([0, 9, 5])
50 client_version_above?([1, 2])
51 end
51 end
52
52
53 def hgversion
53 def hgversion
@@ -72,12 +72,7 module Redmine
72 end
72 end
73
73
74 def template_path_for(version)
74 def template_path_for(version)
75 if ((version <=> [0,9,5]) > 0) || version.empty?
75 "#{HELPERS_DIR}/#{TEMPLATE_NAME}-1.0.#{TEMPLATE_EXTENSION}"
76 ver = "1.0"
77 else
78 ver = "0.9.5"
79 end
80 "#{HELPERS_DIR}/#{TEMPLATE_NAME}-#{ver}.#{TEMPLATE_EXTENSION}"
81 end
76 end
82 end
77 end
83
78
@@ -53,12 +53,14 begin
53 end
53 end
54
54
55 def test_template_path
55 def test_template_path
56 to_test = { [0,9,5] => "0.9.5",
56 to_test = {
57 [1,0] => "1.0",
57 [1,2] => "1.0",
58 [] => "1.0",
58 [] => "1.0",
59 [1,0,1] => "1.0",
59 [1,2,1] => "1.0",
60 [1,7] => "1.0",
60 [1,7] => "1.0",
61 [1,7,1] => "1.0" }
61 [1,7,1] => "1.0",
62 [2,0] => "1.0",
63 }
62 to_test.each do |v, template|
64 to_test.each do |v, template|
63 test_template_path_for(v, template)
65 test_template_path_for(v, template)
64 end
66 end
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now