This is an archive of the discontinued Mercurial Phabricator instance.

config: simplify aliasing commands.update.check
ClosedPublic

Authored by lothiraldan on Oct 16 2017, 1:13 PM.

Details

Summary

experimental.updatecheck was renamed into commands.update.check, use the
config system to provides the fallback on the old config name instead of
adding more code.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lothiraldan created this revision.Oct 16 2017, 1:13 PM
durin42 requested changes to this revision.Oct 16 2017, 9:01 PM
durin42 added a subscriber: durin42.
durin42 added inline comments.
mercurial/configitems.py
184

Please add the comment that this alias should be discarded post-4.4?

This revision now requires changes to proceed.Oct 16 2017, 9:01 PM
lothiraldan updated this revision to Diff 2898.Oct 17 2017, 8:06 AM
lothiraldan marked an inline comment as done.Oct 17 2017, 8:07 AM

I've added the comment, but I think we should keep the alias until we have a way to warn people they use deprecated config aliases.

ryanmce accepted this revision.Oct 17 2017, 8:13 AM
ryanmce added a subscriber: ryanmce.

I agree with @lothiraldan that there's no pressing need to remove aliases, and we should have a mechanism to work before we do this for sure.

This seems like exactly one of the reasons the config registration system was built in the first place -- to permanently (or semi-permanently at least) forward old configs to new ones, to allow smooth config upgrade paths.

I'll queue this as-is but I think we should not necessarily drop this in the future.

This revision was automatically updated to reflect the committed changes.