Mercurial > public > mercurial-scm > hg
comparison mercurial/branchmap.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 |
---|---|
117 cl = repo.changelog | 117 cl = repo.changelog |
118 clrev = cl.rev | 118 clrev = cl.rev |
119 clbranchinfo = cl.branchinfo | 119 clbranchinfo = cl.branchinfo |
120 rbheads = [] | 120 rbheads = [] |
121 closed = set() | 121 closed = set() |
122 for bheads in pycompat.itervalues(remotebranchmap): | 122 for bheads in remotebranchmap.values(): |
123 rbheads += bheads | 123 rbheads += bheads |
124 for h in bheads: | 124 for h in bheads: |
125 r = clrev(h) | 125 r = clrev(h) |
126 b, c = clbranchinfo(r) | 126 b, c = clbranchinfo(r) |
127 if c: | 127 if c: |
404 yield (bn, heads) + self._branchtip(heads) | 404 yield (bn, heads) + self._branchtip(heads) |
405 | 405 |
406 def iterheads(self): | 406 def iterheads(self): |
407 """returns all the heads""" | 407 """returns all the heads""" |
408 self._verifyall() | 408 self._verifyall() |
409 return pycompat.itervalues(self._entries) | 409 return self._entries.values() |
410 | 410 |
411 def copy(self): | 411 def copy(self): |
412 """return an deep copy of the branchcache object""" | 412 """return an deep copy of the branchcache object""" |
413 return type(self)( | 413 return type(self)( |
414 self._repo, | 414 self._repo, |