Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/branchmap.py @ 42133:75e8e16ca107
branchcache: only iterate over branches which needs to be verified
Otherwise we loop over all the branches and call _verifybranch() even if not
required.
Differential Revision: https://phab.mercurial-scm.org/D6240
author | Pulkit Goyal <pulkit@yandex-team.ru> |
---|---|
date | Tue, 16 Apr 2019 15:01:33 +0300 |
parents | d9dc0896e1d3 |
children | f0203c3406e7 |
comparison
equal
deleted
inserted
replaced
42132:d9dc0896e1d3 | 42133:75e8e16ca107 |
---|---|
198 | 198 |
199 self._verifiedbranches.add(branch) | 199 self._verifiedbranches.add(branch) |
200 | 200 |
201 def _verifyall(self): | 201 def _verifyall(self): |
202 """ verifies nodes of all the branches """ | 202 """ verifies nodes of all the branches """ |
203 for b in self._entries: | 203 needverification = set(self._entries.keys()) - self._verifiedbranches |
204 for b in needverification: | |
204 self._verifybranch(b) | 205 self._verifybranch(b) |
205 | 206 |
206 def __iter__(self): | 207 def __iter__(self): |
207 return iter(self._entries) | 208 return iter(self._entries) |
208 | 209 |