@@ -70,7 +70,7 module Redmine | |||||
70 | @url = url |
|
70 | @url = url | |
71 | @login = login if login && !login.empty? |
|
71 | @login = login if login && !login.empty? | |
72 | @password = (password || "") if @login |
|
72 | @password = (password || "") if @login | |
73 | #TODO: better Exception here (IllegalArgumentException) |
|
73 | # TODO: better Exception here (IllegalArgumentException) | |
74 | raise CommandFailed if root_url.blank? |
|
74 | raise CommandFailed if root_url.blank? | |
75 | @root_url = root_url |
|
75 | @root_url = root_url | |
76 | end |
|
76 | end | |
@@ -127,9 +127,9 module Redmine | |||||
127 | :lastrev => Revision.new( |
|
127 | :lastrev => Revision.new( | |
128 | { |
|
128 | { | |
129 | :revision => fields[-4], |
|
129 | :revision => fields[-4], | |
130 | :name => fields[-4], |
|
130 | :name => fields[-4], | |
131 | :time => time, |
|
131 | :time => time, | |
132 | :author => '' |
|
132 | :author => '' | |
133 | }) |
|
133 | }) | |
134 | }) |
|
134 | }) | |
135 | else |
|
135 | else | |
@@ -163,25 +163,21 module Redmine | |||||
163 | cmd_args << "-d" << ">#{time_to_cvstime_rlog(identifier_from)}" if identifier_from |
|
163 | cmd_args << "-d" << ">#{time_to_cvstime_rlog(identifier_from)}" if identifier_from | |
164 | cmd_args << path_with_project |
|
164 | cmd_args << path_with_project | |
165 | scm_cmd(*cmd_args) do |io| |
|
165 | scm_cmd(*cmd_args) do |io| | |
166 | state="entry_start" |
|
166 | state = "entry_start" | |
167 |
|
167 | commit_log = String.new | ||
168 | commit_log=String.new |
|
168 | revision = nil | |
169 |
|
|
169 | date = nil | |
170 |
|
|
170 | author = nil | |
171 |
|
|
171 | entry_path = nil | |
172 |
entry_ |
|
172 | entry_name = nil | |
173 |
|
|
173 | file_state = nil | |
174 |
|
|
174 | branch_map = nil | |
175 | branch_map=nil |
|
|||
176 |
|
||||
177 | io.each_line() do |line| |
|
175 | io.each_line() do |line| | |
178 |
|
176 | if state != "revision" && /^#{ENDLOG}/ =~ line | ||
179 | if state!="revision" && /^#{ENDLOG}/ =~ line |
|
177 | commit_log = String.new | |
180 | commit_log=String.new |
|
178 | revision = nil | |
181 | revision=nil |
|
179 | state = "entry_start" | |
182 | state="entry_start" |
|
|||
183 | end |
|
180 | end | |
184 |
|
||||
185 | if state=="entry_start" |
|
181 | if state=="entry_start" | |
186 | branch_map=Hash.new |
|
182 | branch_map=Hash.new | |
187 | if /^RCS file: #{Regexp.escape(root_url_path)}\/#{Regexp.escape(path_with_project)}(.+),v$/ =~ line |
|
183 | if /^RCS file: #{Regexp.escape(root_url_path)}\/#{Regexp.escape(path_with_project)}(.+),v$/ =~ line | |
@@ -350,11 +346,11 module Redmine | |||||
350 | t1 = time.clone.localtime |
|
346 | t1 = time.clone.localtime | |
351 | return t1.strftime("%Y-%m-%d %H:%M:%S") |
|
347 | return t1.strftime("%Y-%m-%d %H:%M:%S") | |
352 | end |
|
348 | end | |
353 |
|
349 | |||
354 | def normalize_cvs_path(path) |
|
350 | def normalize_cvs_path(path) | |
355 | normalize_path(path.gsub(/Attic\//,'')) |
|
351 | normalize_path(path.gsub(/Attic\//,'')) | |
356 | end |
|
352 | end | |
357 |
|
353 | |||
358 | def normalize_path(path) |
|
354 | def normalize_path(path) | |
359 | path.sub(/^(\/)*(.*)/,'\2').sub(/(.*)(,v)+/,'\1') |
|
355 | path.sub(/^(\/)*(.*)/,'\2').sub(/(.*)(,v)+/,'\1') | |
360 | end |
|
356 | end |
General Comments 0
You need to be logged in to leave comments.
Login now