( )⚙ D8414 nodemap: add a new mode option, with an optional "warn" value

This is an archive of the discontinued Mercurial Phabricator instance.

nodemap: add a new mode option, with an optional "warn" value
ClosedPublic

Authored by marmoute on Apr 14 2020, 11:48 AM.

Details

Summary

When "warn" is set, user will get notified when the slow code, used for
compatibility is used. This can help people to detect situation were using that
feature will give them a slowdown instead of a speedup.

Diff Detail

Repository
rHG Mercurial
Branch
default
Lint
No Linters Available
Unit
No Unit Test Coverage

Event Timeline

marmoute created this revision.Apr 14 2020, 11:48 AM
pulkit added a subscriber: pulkit.Apr 14 2020, 2:45 PM
pulkit added inline comments.
mercurial/localrepo.py
941

nit: we can directly assign the value instead of temp variable

mercurial/revlogutils/nodemap.py
148

needs a b'' prefix

pulkit added inline comments.Apr 14 2020, 2:46 PM
mercurial/configitems.py
684

another minor nit: since the config section is experimental, we can skip the exp- prefix.

marmoute added inline comments.Apr 15 2020, 7:19 AM
mercurial/configitems.py
684

This matcht he pattern used above. In addition the exp- prefix make sense here` the feature is (was) in a state were any actual usage is out of question. Using a specific prefix for this prevent people using older version to step into a non-working experimental feature when t hey try to use an experimental feature that works fine in a later version.

mercurial/localrepo.py
941

Then the line is too long an need wrapping. I would rather have the small tmp variable than complex line wrapping here.

mercurial/revlogutils/nodemap.py
148

good catch, thanks

marmoute updated this revision to Diff 21092.Apr 15 2020, 7:59 AM
marmoute updated this revision to Diff 21227.Apr 27 2020, 1:12 PM
Alphare accepted this revision.May 7 2020, 8:58 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.