* [PATCH] b4-am: Fill in more options
@ 2021-09-23 2:35 Kyle Meyer
2021-09-23 2:43 ` Kyle Meyer
0 siblings, 1 reply; 2+ messages in thread
From: Kyle Meyer @ 2021-09-23 2:35 UTC (permalink / raw)
To: piem
Catch up with some new options and add some older ones that I punted
on earlier. This should cover everything that's in b4 v0.8, hiding
things that are a bit too lore-specific or tailored to command-line
operation.
---
piem-b4.el | 38 +++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)
diff --git a/piem-b4.el b/piem-b4.el
index 1b1b499c..18a68d95 100644
--- a/piem-b4.el
+++ b/piem-b4.el
@@ -200,6 +200,29 @@ (transient-define-argument piem-b4-am:--cherry-pick ()
:argument "--cherry-pick="
:reader #'read-string)
+(transient-define-argument piem-b4-am:--use-project ()
+ :description "Use a specific lore project instead of guessing"
+ :class 'transient-option
+ :shortarg "-p"
+ :argument "--use-project="
+ :level 7
+ :reader #'read-string)
+
+(transient-define-argument piem-b4-am:--guess-branch ()
+ :description "Restrict base guess to this branch"
+ :class 'transient-option
+ :shortarg "-b"
+ :argument "--guess-branch="
+ ;; TODO: Optionally support `magit-read-branch'.
+ :reader #'read-string)
+
+(transient-define-argument piem-b4-am:--guess-lookback ()
+ :description "How many days to go back when guessing base"
+ :class 'transient-option
+ :shortarg "-G"
+ :argument "--guess-lookback="
+ :reader #'transient-read-number-N+)
+
;;;###autoload (autoload 'piem-b4-am "piem-b4" nil t)
(transient-define-prefix piem-b4-am ()
"Filter mbox to patches and feed to git-am"
@@ -207,6 +230,9 @@ (transient-define-prefix piem-b4-am ()
["General options"
("-c" "Check newer versions" "--check-newer-revisions")
("-C" "Don't use local cache" "--no-cache")
+ ;; Hide by default because it hard codes the URL.
+ (7 "-l" "Add a lore.kernel.org/r/ to patches" "--add-link")
+ ("-L" "Do not reroll partial series" "--no-partial-reroll")
("-s" "Add my signed-off-by" "--add-my-sob")
("-S" "Apply trailers without checking email addresses" "--sloppy-trailers")
("-t" "Apply cover letter trailers" "--apply-cover-trailers")
@@ -214,8 +240,18 @@ (transient-define-prefix piem-b4-am ()
(piem-b4-am:--use-version)
(piem-b4-am:--cherry-pick)]
["Options for creating am-ready mboxes"
+ ("-3" "Prepare for 3-way merge" "--prep-3way")
+ ("-g" "Try to guess base" "--guess-base")
+ (piem-b4-am:--guess-branch)
+ (piem-b4-am:--guess-lookback)
+ (piem-b4-am:--use-project)
(piem-b4-am:--outdir)
- (piem-b4-am:--mbox-name)]
+ (piem-b4-am:--mbox-name)
+ ("-M" "Save as maildir" "--save-as-maildir")
+ (7 "-Q" "Save as quilt-read folder" "--quilt-ready")
+ ;; Hide because this is unlikely to be useful outside of
+ ;; command-line piping to `git am'.
+ (5 "-V" "Do not save cover letter" "--no-cover")]
["Actions"
[("a" "Message ID -> mbox -> git-am" piem-b4-am-from-mid)]
[("b" "Local mbox -> am-ready mbox" piem-b4-am-ready-from-mbox)
base-commit: c901d3ec025773c8eae04257099fcdfe704085ac
--
2.33.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] b4-am: Fill in more options
2021-09-23 2:35 [PATCH] b4-am: Fill in more options Kyle Meyer
@ 2021-09-23 2:43 ` Kyle Meyer
0 siblings, 0 replies; 2+ messages in thread
From: Kyle Meyer @ 2021-09-23 2:43 UTC (permalink / raw)
To: piem
Kyle Meyer writes:
> +(transient-define-argument piem-b4-am:--guess-lookback ()
> + :description "How many days to go back when guessing base"
> + :class 'transient-option
> + :shortarg "-G"
> + :argument "--guess-lookback="
> + :reader #'transient-read-number-N+)
[...]
> + ("-L" "Do not reroll partial series" "--no-partial-reroll")
[...]
> + (5 "-V" "Do not save cover letter" "--no-cover")]
I'm not very happy with these keys but haven't been able to come up with
anything better.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-09-23 2:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-23 2:35 [PATCH] b4-am: Fill in more options Kyle Meyer
2021-09-23 2:43 ` Kyle Meyer
Code repositories for project(s) associated with this public inbox
https://git.kyleam.com/piem/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).