##// END OF EJS Templates
scm: git: code clean up adapter....
Toshi MARUYAMA -
r4914:a1364ed2b847
parent child
Show More
@@ -172,7 +172,6 module Redmine
172 172 files=[]
173 173 changeset = {}
174 174 parsing_descr = 0 #0: not parsing desc or files, 1: parsing desc, 2: parsing files
175 revno = 1
176 175
177 176 io.each_line do |line|
178 177 if line =~ /^commit ([0-9a-f]{40})$/
@@ -195,7 +194,6 module Redmine
195 194 end
196 195 changeset = {}
197 196 files = []
198 revno = revno + 1
199 197 end
200 198 changeset[:commit] = $1
201 199 elsif (parsing_descr == 0) && line =~ /^(\w+):\s*(.*)$/
@@ -210,16 +208,16 module Redmine
210 208 parsing_descr = 1
211 209 changeset[:description] = ""
212 210 elsif (parsing_descr == 1 || parsing_descr == 2) \
213 && line =~ /^:\d+\s+\d+\s+[0-9a-f.]+\s+[0-9a-f.]+\s+(\w)\t(.+)$/
211 && line =~ /^:\d+\s+\d+\s+[0-9a-f.]+\s+[0-9a-f.]+\s+(\w)\t(.+)$/
214 212 parsing_descr = 2
215 fileaction = $1
216 filepath = $2
213 fileaction = $1
214 filepath = $2
217 215 files << {:action => fileaction, :path => filepath}
218 216 elsif (parsing_descr == 1 || parsing_descr == 2) \
219 && line =~ /^:\d+\s+\d+\s+[0-9a-f.]+\s+[0-9a-f.]+\s+(\w)\d+\s+(\S+)\t(.+)$/
217 && line =~ /^:\d+\s+\d+\s+[0-9a-f.]+\s+[0-9a-f.]+\s+(\w)\d+\s+(\S+)\t(.+)$/
220 218 parsing_descr = 2
221 fileaction = $1
222 filepath = $3
219 fileaction = $1
220 filepath = $3
223 221 files << {:action => fileaction, :path => filepath}
224 222 elsif (parsing_descr == 1) && line.chomp.to_s == ""
225 223 parsing_descr = 2
General Comments 0
You need to be logged in to leave comments. Login now