##// END OF EJS Templates
scm: mercurial: code clean up adapter....
Toshi MARUYAMA -
r5359:a8e7936337d1
parent child
Show More
@@ -193,7 +193,6 module Redmine
193 193 rescue
194 194 end
195 195 end
196
197 196 as_ary(log['logentry']).each do |le|
198 197 cpalist = as_ary(le['paths']['path-copied']).map do |e|
199 198 [e['__content__'], e['copyfrom-path']].map do |s|
@@ -201,20 +200,19 module Redmine
201 200 end
202 201 end
203 202 cpmap = Hash[*cpalist.flatten]
204
205 203 paths = as_ary(le['paths']['path']).map do |e|
206 204 p = scm_iconv('UTF-8', @path_encoding, CGI.unescape(e['__content__']) )
207 {:action => e['action'], :path => with_leading_slash(p),
208 :from_path => (cpmap.member?(p) ? with_leading_slash(cpmap[p]) : nil),
205 {:action => e['action'],
206 :path => with_leading_slash(p),
207 :from_path => (cpmap.member?(p) ? with_leading_slash(cpmap[p]) : nil),
209 208 :from_revision => (cpmap.member?(p) ? le['revision'] : nil)}
210 209 end.sort { |a, b| a[:path] <=> b[:path] }
211
212 210 yield Revision.new(:revision => le['revision'],
213 :scmid => le['node'],
214 :author => (le['author']['__content__'] rescue ''),
215 :time => Time.parse(le['date']['__content__']),
216 :message => le['msg']['__content__'],
217 :paths => paths)
211 :scmid => le['node'],
212 :author => (le['author']['__content__'] rescue ''),
213 :time => Time.parse(le['date']['__content__']),
214 :message => le['msg']['__content__'],
215 :paths => paths)
218 216 end
219 217 self
220 218 end
General Comments 0
You need to be logged in to leave comments. Login now