@@ -109,7 +109,7 module Redmine | |||||
109 |
|
109 | |||
110 | path_with_project="#{url}#{with_leading_slash(path)}" |
|
110 | path_with_project="#{url}#{with_leading_slash(path)}" | |
111 | cmd = "#{CVS_BIN} -d #{shell_quote root_url} rlog" |
|
111 | cmd = "#{CVS_BIN} -d #{shell_quote root_url} rlog" | |
112 | cmd << " -d\">#{time_to_cvstime(identifier_from)}\"" if identifier_from |
|
112 | cmd << " -d\">#{time_to_cvstime_rlog(identifier_from)}\"" if identifier_from | |
113 | cmd << " #{shell_quote path_with_project}" |
|
113 | cmd << " #{shell_quote path_with_project}" | |
114 | shellout(cmd) do |io| |
|
114 | shellout(cmd) do |io| | |
115 | state="entry_start" |
|
115 | state="entry_start" | |
@@ -290,6 +290,12 module Redmine | |||||
290 | end |
|
290 | end | |
291 | return time.strftime("%Y-%m-%d %H:%M:%S") |
|
291 | return time.strftime("%Y-%m-%d %H:%M:%S") | |
292 | end |
|
292 | end | |
|
293 | ||||
|
294 | def time_to_cvstime_rlog(time) | |||
|
295 | return nil if time.nil? | |||
|
296 | t1 = time.clone.localtime | |||
|
297 | return t1.strftime("%Y-%m-%d %H:%M:%S") | |||
|
298 | end | |||
293 |
|
299 | |||
294 | def normalize_cvs_path(path) |
|
300 | def normalize_cvs_path(path) | |
295 | normalize_path(path.gsub(/Attic\//,'')) |
|
301 | normalize_path(path.gsub(/Attic\//,'')) |
@@ -19,6 +19,15 begin | |||||
19 | end |
|
19 | end | |
20 | assert_equal 14, cnt |
|
20 | assert_equal 14, cnt | |
21 | end |
|
21 | end | |
|
22 | ||||
|
23 | def test_revisions_from_rev3 | |||
|
24 | rev3_committed_on = Time.gm(2007, 12, 13, 16, 27, 22) | |||
|
25 | cnt = 0 | |||
|
26 | @adapter.revisions('', rev3_committed_on, nil, :with_paths => true) do |revision| | |||
|
27 | cnt += 1 | |||
|
28 | end | |||
|
29 | assert_equal 2, cnt | |||
|
30 | end | |||
22 | else |
|
31 | else | |
23 | puts "Cvs test repository NOT FOUND. Skipping unit tests !!!" |
|
32 | puts "Cvs test repository NOT FOUND. Skipping unit tests !!!" | |
24 | def test_fake; assert true end |
|
33 | def test_fake; assert true end |
General Comments 0
You need to be logged in to leave comments.
Login now