##// END OF EJS Templates
synthrepo: move from dict() construction to {} literals...
Augie Fackler -
r20672:05e58b08 default
parent child Browse files
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=dict(git=True))), [])
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(dict(revs=len(revs),
192 json.dump({'revs': len(revs),
193 lineschanged=pronk(lineschanged),
193 'lineschanged': pronk(lineschanged),
194 children=pronk(invchildren),
194 'children': pronk(invchildren),
195 fileschanged=pronk(fileschanged),
195 'fileschanged': pronk(fileschanged),
196 filesadded=pronk(filesadded),
196 'filesadded': pronk(filesadded),
197 linesinfilesadded=pronk(linesinfilesadded),
197 'linesinfilesadded': pronk(linesinfilesadded),
198 dirsadded=pronk(dirsadded),
198 'dirsadded': pronk(dirsadded),
199 filesremoved=pronk(filesremoved),
199 'filesremoved': pronk(filesremoved),
200 linelengths=pronk(linelengths),
200 'linelengths': pronk(linelengths),
201 parents=pronk(parents),
201 'parents': pronk(parents),
202 p1distance=pronk(p1distance),
202 'p1distance': pronk(p1distance),
203 p2distance=pronk(p2distance),
203 'p2distance': pronk(p2distance),
204 interarrival=pronk(interarrival),
204 'interarrival': pronk(interarrival),
205 tzoffset=pronk(tzoffset),
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