diff options
Diffstat (limited to 'b4/command.py')
-rw-r--r-- | b4/command.py | 102 |
1 files changed, 50 insertions, 52 deletions
diff --git a/b4/command.py b/b4/command.py index fb9f6d4..62d9cb1 100644 --- a/b4/command.py +++ b/b4/command.py @@ -71,19 +71,19 @@ def cmd_kr(cmdargs): b4.kr.main(cmdargs) -def cmd_ez_series(cmdargs): +def cmd_prep(cmdargs): import b4.ez - b4.ez.cmd_ez_series(cmdargs) + b4.ez.cmd_prep(cmdargs) -def cmd_ez_trailers(cmdargs): +def cmd_trailers(cmdargs): import b4.ez - b4.ez.cmd_ez_trailers(cmdargs) + b4.ez.cmd_trailers(cmdargs) -def cmd_ez_send(cmdargs): +def cmd_send(cmdargs): import b4.ez - b4.ez.cmd_ez_send(cmdargs) + b4.ez.cmd_send(cmdargs) def cmd_am(cmdargs): @@ -250,57 +250,55 @@ def cmd(): help='Show all developer keys found in a thread') sp_kr.set_defaults(func=cmd_kr) - # b4 ez commands - # ez-series - sp_ezs = subparsers.add_parser('ez-series', help='Simplify work on series submitted for review') - sp_ezs.add_argument('--edit-cover', action='store_true', default=False, - help='Edit the cover letter in your defined $EDITOR (or core.editor)') - sp_ezs.add_argument('--show-revision', action='store_true', default=False, - help='Show current series revision number') - sp_ezs.add_argument('--force-revision', default=False, type=int, - help='Force revision to be this number instead') - ag_ezn = sp_ezs.add_argument_group('Create new branch', 'Create new branch for ez-series') - ag_ezn.add_argument('-n', '--new', dest='new_series_name', - help='Create a new branch and prepare for new series') - ag_ezn.add_argument('-f', '--fork-point', dest='fork_point', - help='When creating a new branch, use this fork point instead of HEAD') - ag_ezn = sp_ezs.add_argument_group('Enroll existing branch', 'Enroll existing branch for ez-series') - ag_ezn.add_argument('-e', '--enroll-with-base', dest='base_branch', - help='Enroll current branch, using the branch passed as parameter as base branch') - sp_ezs.set_defaults(func=cmd_ez_series) - - # ez-trailers - sp_ezt = subparsers.add_parser('ez-trailers', help='Retrieve and apply trailers received for your submission') - sp_ezt.add_argument('-u', '--update-trailers', action='store_true', default=False, - help='Update commits with latest received trailers') - sp_ezt.add_argument('-F', '--trailers-from', dest='msgid', + # b4 prep + sp_prep = subparsers.add_parser('prep', help='Work on patch series to submit for mailing list review') + sp_prep.add_argument('--edit-cover', action='store_true', default=False, + help='Edit the cover letter in your defined $EDITOR (or core.editor)') + sp_prep.add_argument('--show-revision', action='store_true', default=False, + help='Show current series revision number') + sp_prep.add_argument('--force-revision', default=False, metavar='N', type=int, + help='Force revision to be this number instead') + sp_prep.add_argument('--format-patch', metavar='OUTPUT_DIR', + help='Output prep-tracked commits as patches') + ag_prepn = sp_prep.add_argument_group('Create new branch', 'Create a new branch for working on patch series') + ag_prepn.add_argument('-n', '--new', dest='new_series_name', + help='Create a new branch for working on a patch series') + ag_prepn.add_argument('-f', '--fork-point', dest='fork_point', + help='When creating a new branch, use this fork point instead of HEAD') + ag_prepe = sp_prep.add_argument_group('Enroll existing branch', 'Enroll existing branch for prep work') + ag_prepe.add_argument('-e', '--enroll-with-base', dest='base_branch', + help='Enroll current branch, using the branch passed as parameter as base branch') + sp_prep.set_defaults(func=cmd_prep) + + # b4 trailers + sp_trl = subparsers.add_parser('trailers', help='Operate on trailers received for mailing list reviews') + sp_trl.add_argument('-u', '--update', action='store_true', default=False, + help='Update branch commits with latest received trailers') + sp_trl.add_argument('-F', '--trailers-from', dest='msgid', help='Look for trailers in the thread with this msgid instead of using the series change-id') - sp_ezt.add_argument('-s', '--signoff', action='store_true', default=False, + sp_trl.add_argument('-s', '--signoff', action='store_true', default=False, help='Add my Signed-off-by trailer, if not already present') - sp_ezt.add_argument('-S', '--sloppy-trailers', dest='sloppytrailers', action='store_true', default=False, + sp_trl.add_argument('-S', '--sloppy-trailers', dest='sloppytrailers', action='store_true', default=False, help='Apply trailers without email address match checking') - sp_ezt.set_defaults(func=cmd_ez_trailers) + sp_trl.set_defaults(func=cmd_trailers) # ez-send - sp_ezd = subparsers.add_parser('ez-send', help='Submit your series for review on the mailing lists') - ezd_x = sp_ezd.add_mutually_exclusive_group() - ezd_x.add_argument('-o', '--output-dir', - help='Do not send, just write patches into this directory (git-format-patch mode)') - ezd_x.add_argument('-d', '--dry-run', dest='dryrun', action='store_true', default=False, - help='Do not actually send, just dump out raw smtp messages to the stdout') - sp_ezd.add_argument('--prefixes', nargs='+', choices=['RFC', 'WIP', 'RESEND'], - help='Prefixes to add to PATCH (e.g. RFC, WIP, RESEND)') - sp_ezd.add_argument('--no-auto-to-cc', action='store_true', default=False, - help='Do not automatically collect To: and Cc: addresses') - sp_ezd.add_argument('--to', nargs='+', - help='Addresses to add to the automatically collected To: list') - sp_ezd.add_argument('--cc', nargs='+', - help='Addresses to add to the automatically collected Cc: list') - sp_ezd.add_argument('--not-me-too', action='store_true', default=False, - help='Remove yourself from the To: or Cc: list') - sp_ezd.add_argument('--no-sign', action='store_true', default=False, - help='Do not cryptographically sign your patches with patatt') - sp_ezd.set_defaults(func=cmd_ez_send) + sp_send = subparsers.add_parser('send', help='Submit your work for review on the mailing lists') + sp_send.add_argument('-d', '--dry-run', dest='dryrun', action='store_true', default=False, + help='Do not send, just dump out raw smtp messages to the stdout') + sp_send.add_argument('-o', '--output-dir', + help='Do not send, write raw messages to this directory (forces --dry-run)') + sp_send.add_argument('--prefixes', nargs='+', choices=['RFC', 'WIP', 'RESEND'], + help='Prefixes to add to PATCH (e.g. RFC, WIP, RESEND)') + sp_send.add_argument('--no-auto-to-cc', action='store_true', default=False, + help='Do not automatically collect To: and Cc: addresses') + sp_send.add_argument('--to', nargs='+', help='Addresses to add to the To: list') + sp_send.add_argument('--cc', nargs='+', help='Addresses to add to the Cc: list') + sp_send.add_argument('--not-me-too', action='store_true', default=False, + help='Remove yourself from the To: or Cc: list') + sp_send.add_argument('--no-sign', action='store_true', default=False, + help='Do not cryptographically sign your patches with patatt') + sp_send.set_defaults(func=cmd_send) cmdargs = parser.parse_args() |