comparison contrib/synthrepo.py @ 48935:2cce2fa5bcf7

py3: replace pycompat.itervalues(x) with x.values() pycompat.itervalues(x) just calls x.values(). So this is equivalent. The rewrite was perfomed via an automated search and replace. Differential Revision: https://phab.mercurial-scm.org/D12341
author Gregory Szorc <gregory.szorc@gmail.com>
date Tue, 01 Mar 2022 20:52:32 -0800
parents 6000f5b25c9b
children 24ee91ba9aa8
comparison
equal deleted inserted replaced
48934:06de08b36c82 48935:2cce2fa5bcf7
210 ) 210 )
211 fileadds, diradds, fileremoves, filechanges = 0, 0, 0, 0 211 fileadds, diradds, fileremoves, filechanges = 0, 0, 0, 0
212 for filename, mar, lineadd, lineremove, isbin in parsegitdiff(diff): 212 for filename, mar, lineadd, lineremove, isbin in parsegitdiff(diff):
213 if isbin: 213 if isbin:
214 continue 214 continue
215 added = sum(pycompat.itervalues(lineadd), 0) 215 added = sum(lineadd.values(), 0)
216 if mar == 'm': 216 if mar == 'm':
217 if added and lineremove: 217 if added and lineremove:
218 lineschanged[ 218 lineschanged[
219 roundto(added, 5), roundto(lineremove, 5) 219 roundto(added, 5), roundto(lineremove, 5)
220 ] += 1 220 ] += 1