When a filter computation is triggered, If --traceback is provided, we will
display a traceback in addition to the debug message.
Details
Details
Diff Detail
Diff Detail
- Repository
 - rHG Mercurial
 - Lint
 Lint Skipped - Unit
 Unit Tests Skipped 
When a filter computation is triggered, If --traceback is provided, we will
display a traceback in addition to the debug message.
| Lint Skipped | 
| Unit Tests Skipped | 
| Path | Packages | |||
|---|---|---|---|---|
| M | mercurial/repoview.py (14 lines) | 
| Commit | Parents | Author | Summary | Date | 
|---|---|---|---|---|
| 214de85ce358 | e03bd34fd358 | Pierre-Yves David | Nov 17 2019, 12:27 AM | 
| def filterrevs(repo, filtername, visibilityexceptions=None): | def filterrevs(repo, filtername, visibilityexceptions=None): | ||||
| """returns set of filtered revision for this filter name | """returns set of filtered revision for this filter name | ||||
| visibilityexceptions is a set of revs which must are exceptions for | visibilityexceptions is a set of revs which must are exceptions for | ||||
| hidden-state and must be visible. They are dynamic and hence we should not | hidden-state and must be visible. They are dynamic and hence we should not | ||||
| cache it's result""" | cache it's result""" | ||||
| if filtername not in repo.filteredrevcache: | if filtername not in repo.filteredrevcache: | ||||
| if repo.ui.configbool(b'devel', b'debug.repo-filters'): | if repo.ui.configbool(b'devel', b'debug.repo-filters'): | ||||
| msg = b'debug.filters: computing revision filter for "%s"\n' | msg = b'computing revision filter for "%s"' | ||||
| repo.ui.debug(msg % filtername) | msg %= filtername | ||||
| if repo.ui.tracebackflag and repo.ui.debugflag: | |||||
| # XXX use ui.write_err | |||||
| util.debugstacktrace( | |||||
| msg, | |||||
| f=repo.ui._fout, | |||||
| otherf=repo.ui._ferr, | |||||
| prefix=b'debug.filters: ', | |||||
| ) | |||||
| else: | |||||
| repo.ui.debug(b'debug.filters: %s\n' % msg) | |||||
| func = filtertable[filtername] | func = filtertable[filtername] | ||||
| if visibilityexceptions: | if visibilityexceptions: | ||||
| return func(repo.unfiltered, visibilityexceptions) | return func(repo.unfiltered, visibilityexceptions) | ||||
| repo.filteredrevcache[filtername] = func(repo.unfiltered()) | repo.filteredrevcache[filtername] = func(repo.unfiltered()) | ||||
| return repo.filteredrevcache[filtername] | return repo.filteredrevcache[filtername] | ||||
| def wrapchangelog(unfichangelog, filteredrevs): | def wrapchangelog(unfichangelog, filteredrevs): | ||||