Show More
@@ -152,7 +152,7 b' def analyze(ui, repo, *revs, **opts):' | |||||
152 | if lastctx.rev() != nullrev: |
|
152 | if lastctx.rev() != nullrev: | |
153 | interarrival[roundto(ctx.date()[0] - lastctx.date()[0], 300)] += 1 |
|
153 | interarrival[roundto(ctx.date()[0] - lastctx.date()[0], 300)] += 1 | |
154 | diff = sum((d.splitlines() |
|
154 | diff = sum((d.splitlines() | |
155 |
for d in ctx.diff(pctx, opts= |
|
155 | for d in ctx.diff(pctx, opts={'git': True})), []) | |
156 | fileadds, diradds, fileremoves, filechanges = 0, 0, 0, 0 |
|
156 | fileadds, diradds, fileremoves, filechanges = 0, 0, 0, 0 | |
157 | for filename, mar, lineadd, lineremove, binary in parsegitdiff(diff): |
|
157 | for filename, mar, lineadd, lineremove, binary in parsegitdiff(diff): | |
158 | if binary: |
|
158 | if binary: | |
@@ -189,21 +189,21 b' def analyze(ui, repo, *revs, **opts):' | |||||
189 | def pronk(d): |
|
189 | def pronk(d): | |
190 | return sorted(d.iteritems(), key=lambda x: x[1], reverse=True) |
|
190 | return sorted(d.iteritems(), key=lambda x: x[1], reverse=True) | |
191 |
|
191 | |||
192 |
json.dump( |
|
192 | json.dump({'revs': len(revs), | |
193 |
|
|
193 | 'lineschanged': pronk(lineschanged), | |
194 |
|
|
194 | 'children': pronk(invchildren), | |
195 |
|
|
195 | 'fileschanged': pronk(fileschanged), | |
196 |
|
|
196 | 'filesadded': pronk(filesadded), | |
197 |
|
|
197 | 'linesinfilesadded': pronk(linesinfilesadded), | |
198 |
|
|
198 | 'dirsadded': pronk(dirsadded), | |
199 |
|
|
199 | 'filesremoved': pronk(filesremoved), | |
200 |
|
|
200 | 'linelengths': pronk(linelengths), | |
201 |
|
|
201 | 'parents': pronk(parents), | |
202 |
|
|
202 | 'p1distance': pronk(p1distance), | |
203 |
|
|
203 | 'p2distance': pronk(p2distance), | |
204 |
|
|
204 | 'interarrival': pronk(interarrival), | |
205 |
|
|
205 | 'tzoffset': pronk(tzoffset), | |
206 |
|
|
206 | }, | |
207 | fp) |
|
207 | fp) | |
208 | fp.close() |
|
208 | fp.close() | |
209 |
|
209 |
General Comments 0
You need to be logged in to leave comments.
Login now