Merge ppa-dev-tools:use-subparsers-for-args into ppa-dev-tools:main

Proposed by Bryce Harrington
Status: Merged
Approved by: Bryce Harrington
Approved revision: 37c7bb10017c75ab4f4f7d1b261bd085c6f4d0e9
Merge reported by: Bryce Harrington
Merged at revision: 37c7bb10017c75ab4f4f7d1b261bd085c6f4d0e9
Proposed branch: ppa-dev-tools:use-subparsers-for-args
Merge into: ppa-dev-tools:main
Diff against target: 179 lines (+120/-19)
2 files modified
scripts/ppa (+60/-9)
tests/test_scripts_ppa.py (+60/-10)
Reviewer Review Type Date Requested Status
Christian Ehrhardt  (community) Approve
Ubuntu Server Pending
Canonical Server Reporter Pending
Review via email: mp+431543@code.staging.launchpad.net

Description of the change

Modifies command argument handling to allow each command to have its own set of options. I had been originally planning to have a single parser and just avoid overloading args, but doing this allows for say, -N to mean one thing for one command and something totally different for another.

Two other more practical effects of this is that it should make the help text better organized (so it'll be clearer for users which args are relevant for each command), as well as writing test cases.

To post a comment you must log in.
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Generally ok with this split, with the low amount of suboptions it looks odd, but makes sense IMHO.
One request on better wording or fixing bugs or both (Sorry, didn't track their status if they are already fixed).

Plus one potentially wrong nit pick (you are the native speaker after all).

Either way, none of this is strong enough to stop this +1 overall.

review: Approve
Revision history for this message
Bryce Harrington (bryce) wrote :

Thanks, yeah the options will be growing this branch just sets the framework to place them in.

Revision history for this message
Bryce Harrington (bryce) wrote :

Pushed:
To git+ssh://git.launchpad.net/ppa-dev-tools
   8ec7d86..0e673cc main -> main

There was an error fetching revisions from git servers. Please try again in a few minutes. If the problem persists, contact Launchpad support.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: