I was seeing weird stalls in some fast commands, and these trace
events help explain them.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Lint Skipped - Unit
Unit Tests Skipped
I was seeing weird stalls in some fast commands, and these trace
events help explain them.
| Lint Skipped |
| Unit Tests Skipped |
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/obsolete.py (11 lines) | |||
| M | mercurial/repoview.py (4 lines) |
| Commit | Parents | Author | Summary | Date |
|---|---|---|---|---|
| 730419c793ae | 4f1f86b864a7 | Augie Fackler | Jun 19 2019, 6:22 PM |
| return decorator | return decorator | ||||
| def getrevs(repo, name): | def getrevs(repo, name): | ||||
| """Return the set of revision that belong to the <name> set | """Return the set of revision that belong to the <name> set | ||||
| Such access may compute the set and cache it for future use""" | Such access may compute the set and cache it for future use""" | ||||
| repo = repo.unfiltered() | repo = repo.unfiltered() | ||||
| with util.timedcm('getrevs %s', name): | |||||
| if not repo.obsstore: | if not repo.obsstore: | ||||
| return frozenset() | return frozenset() | ||||
| if name not in repo.obsstore.caches: | if name not in repo.obsstore.caches: | ||||
| repo.obsstore.caches[name] = cachefuncs[name](repo) | repo.obsstore.caches[name] = cachefuncs[name](repo) | ||||
| return repo.obsstore.caches[name] | return repo.obsstore.caches[name] | ||||
| # To be simple we need to invalidate obsolescence cache when: | # To be simple we need to invalidate obsolescence cache when: | ||||
| # | # | ||||
| # - new changeset is added: | # - new changeset is added: | ||||
| # - public phase is changed | # - public phase is changed | ||||
| # - obsolescence marker are added | # - obsolescence marker are added | ||||
| # - strip is used a repo | # - strip is used a repo | ||||
| this changelog must not be used for writing""" | this changelog must not be used for writing""" | ||||
| # some cache may be implemented later | # some cache may be implemented later | ||||
| unfi = self._unfilteredrepo | unfi = self._unfilteredrepo | ||||
| unfichangelog = unfi.changelog | unfichangelog = unfi.changelog | ||||
| # bypass call to changelog.method | # bypass call to changelog.method | ||||
| unfiindex = unfichangelog.index | unfiindex = unfichangelog.index | ||||
| unfilen = len(unfiindex) | unfilen = len(unfiindex) | ||||
| unfinode = unfiindex[unfilen - 1][7] | unfinode = unfiindex[unfilen - 1][7] | ||||
| with util.timedcm('repo filter for %s', self.filtername): | |||||
| revs = filterrevs(unfi, self.filtername, self._visibilityexceptions) | revs = filterrevs(unfi, self.filtername, self._visibilityexceptions) | ||||
| cl = self._clcache | cl = self._clcache | ||||
| newkey = (unfilen, unfinode, hash(revs), unfichangelog._delayed) | newkey = (unfilen, unfinode, hash(revs), unfichangelog._delayed) | ||||
| # if cl.index is not unfiindex, unfi.changelog would be | # if cl.index is not unfiindex, unfi.changelog would be | ||||
| # recreated, and our clcache refers to garbage object | # recreated, and our clcache refers to garbage object | ||||
| if cl is not None and ( | if cl is not None and ( | ||||
| cl.index is not unfiindex or newkey != self._clcachekey | cl.index is not unfiindex or newkey != self._clcachekey | ||||
| ): | ): | ||||
| cl = None | cl = None | ||||