##// 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,14 +200,13 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),
205 {:action => e['action'],
206 :path => with_leading_slash(p),
208 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 211 :scmid => le['node'],
214 212 :author => (le['author']['__content__'] rescue ''),
General Comments 0
You need to be logged in to leave comments. Login now