Mercurial > public > mercurial-scm > hg
comparison mercurial/mergestate.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 | f254fc73d956 |
children | 642e31cb55f0 |
comparison
equal
deleted
inserted
replaced
48934:06de08b36c82 | 48935:2cce2fa5bcf7 |
---|---|
11 nullrev, | 11 nullrev, |
12 ) | 12 ) |
13 from . import ( | 13 from . import ( |
14 error, | 14 error, |
15 filemerge, | 15 filemerge, |
16 pycompat, | |
17 util, | 16 util, |
18 ) | 17 ) |
19 from .utils import hashutil | 18 from .utils import hashutil |
20 | 19 |
21 _pack = struct.pack | 20 _pack = struct.pack |
465 | 464 |
466 def counts(self): | 465 def counts(self): |
467 """return counts for updated, merged and removed files in this | 466 """return counts for updated, merged and removed files in this |
468 session""" | 467 session""" |
469 updated, merged, removed = 0, 0, 0 | 468 updated, merged, removed = 0, 0, 0 |
470 for r, action in pycompat.itervalues(self._results): | 469 for r, action in self._results.values(): |
471 if r is None: | 470 if r is None: |
472 updated += 1 | 471 updated += 1 |
473 elif r == 0: | 472 elif r == 0: |
474 if action == ACTION_REMOVE: | 473 if action == ACTION_REMOVE: |
475 removed += 1 | 474 removed += 1 |