hiddenerror: do not wrap changectx
ClosedPublic

Authored by quark on Nov 17 2017, 1:58 PM.

Details

Reviewers
durham
Group Reviewers
Restricted Project
Commits
rFBHGX9a498ad2c6b2: hiddenerror: do not wrap changectx
Summary

Instead of wrapping changectx constructor, there is a cleaner way to change
the hidden error message. changectx is constructed frequently so this change
also has perf benefit. It saves about 5ms when running sl on fbsource and
it also makes traceprof able to expand changectx.init call graph.

Diff Detail

Repository
rFBHGX Facebook Mercurial Extensions
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
quark created this revision.Nov 17 2017, 1:58 PM
Herald added a reviewer: Restricted Project. · View Herald TranscriptNov 17 2017, 1:58 PM
durham accepted this revision.Nov 30 2017, 7:08 PM
durham added a subscriber: durham.

I assume the tests cover this code path?

hgext3rd/hiddenerror.py
46

Is 'rev' guaranteed to be a integer?

This revision is now accepted and ready to land.Nov 30 2017, 7:08 PM
quark added inline comments.Nov 30 2017, 7:10 PM
hgext3rd/hiddenerror.py
46

Good question. Not sure. Will add a test.

This revision was automatically updated to reflect the committed changes.