Page MenuHomeSoftware Heritage

cli: add support for aliases in click command groups
ClosedPublic

Authored by douardda on May 16 2019, 4:07 PM.

Details

Summary

this allows to rename (sub)commands while keeping the old name working,
albeit not listed in help messages.

Say one wants to rename:

swh scheduler api-server

as

swh scheduler rpc-serve

but keep the former version usable.

Also fix logging config in main's swh command
we want the root logger configured there, not the cli one.

Related to T1671.

Diff Detail

Repository
rDCORE Foundations and core functionalities
Branch
nextversion
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 5758
Build 7885: tox-on-jenkinsJenkins
Build 7884: arc lint + arc unit

Event Timeline

douardda retitled this revision from cli: add spport for aliases in click command groups to cli: add support for aliases in click command groups.May 16 2019, 4:19 PM
This revision is now accepted and ready to land.May 16 2019, 6:07 PM

Please add click in requirements-test.txt :-)

In D1479#32945, @olasd wrote:

Please add click in requirements-test.txt :-)

Woopidoops! good catch, thx!

add click in requirement-tests

This revision was landed with ongoing or failed builds.May 17 2019, 9:38 AM
This revision was automatically updated to reflect the committed changes.