From patchwork Sat Nov 23 04:07:04 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D7478: repoview: display stack trace along side the debug message From: phabricator X-Patchwork-Id: 43457 Message-Id: <01514f691c2bc090270b24a88a210db7@localhost.localdomain> To: Phabricator Cc: mercurial-devel@mercurial-scm.org Date: Sat, 23 Nov 2019 04:07:04 +0000 Closed by commit rHGb9e4226ff1db: repoview: display stack trace along side the debug message (authored by marmoute). This revision was automatically updated to reflect the committed changes. REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D7478?vs=18285&id=18330 CHANGES SINCE LAST ACTION https://phab.mercurial-scm.org/D7478/new/ REVISION DETAIL https://phab.mercurial-scm.org/D7478 AFFECTED FILES mercurial/repoview.py CHANGE DETAILS To: marmoute, #hg-reviewers, indygreg Cc: mercurial-devel diff --git a/mercurial/repoview.py b/mercurial/repoview.py --- a/mercurial/repoview.py +++ b/mercurial/repoview.py @@ -218,8 +218,18 @@ cache it's result""" if filtername not in repo.filteredrevcache: if repo.ui.configbool(b'devel', b'debug.repo-filters'): - msg = b'debug.filters: computing revision filter for "%s"\n' - repo.ui.debug(msg % filtername) + msg = b'computing revision filter for "%s"' + 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] if visibilityexceptions: return func(repo.unfiltered, visibilityexceptions)