From 33b0c2d99f0336b961c5da5d4dfae9f6dfefd494 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Sat, 27 Jun 2026 09:48:50 +0200 Subject: docs: document -R named-hint review Co-Authored-By: Claude Opus 4.8 --- CLAUDE.md | 6 +++++- mkhint | 3 ++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index c539d4b..560df86 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -97,6 +97,10 @@ Test coverage: | T41 | `-R` no matched rows — "nothing to review", exit 0 | | T42 | `--check` single pkg — nvchecker called with `-e ` | | T43 | `--check` two pkgs — nvchecker full scan, no `-e` | +| T44 | `-R ` non-matched hint — diff shown, Keep leaves it | +| T45 | `-R ` answer D — named hint and .bak removed | +| T46 | `-R ` — both reviewed, summary "Reviewed 2" | +| T47 | `-R ` — exit 2 | When adding new features, add a corresponding test case to `tests/mkhint_test.sh`. @@ -107,7 +111,7 @@ When adding new features, add a corresponding test case to `tests/mkhint_test.sh - `--new` when hint already exists: backs up old, creates empty skeleton. - `--hintfile` with no `-v`: queries nvchecker for latest version, shows current vs. latest, prompts to accept/override/decline. After accepting, runs `nvtake` to sync nvchecker's keyfile. - `--list` / `-l`: lists hints with `HintVer`/`SBOVer`; rows where the two are byte-equal are highlighted (color only on a TTY; plain when piped). Adds a legend when any row matched. -- `--review` / `-R`: iterates only the matched (highlighted) hints. For each, shows the hint side-by-side with its `.info` (`git diff --no-index` if git present, else `diff -y`), then prompts `[K]eep / [D]elete / [S]kip` (default Keep). Delete removes the hint and its `.bak` via `_remove_hint`. Prints a deleted/kept summary. `-l` and `-R` combine: `-lR` shows the table first, then reviews. No matches → "nothing to review", exit 0. +- `--review` / `-R`: with no package args, iterates only the matched (highlighted) hints. With explicit package names (`-R foo bar`), reviews each named hint regardless of version match (existence required: missing hint → exit 2). For each, shows the hint side-by-side with its `.info` (`git diff --no-index` if git present, else `diff -y`), then prompts `[K]eep / [D]elete / [S]kip` (default Keep). Delete removes the hint and its `.bak` via `_remove_hint`. Prints a deleted/kept summary counting hints actually reviewed. `-l` and `-R` combine: `-lR` shows the table first, then reviews. Bare `-R` with no matches → "nothing to review", exit 0. Per-hint logic lives in `_review_one_hint`; `review_hint_files` drives it from either the named list or `MATCHED_PKGS`. - `--check` / `-C`: runs nvchecker for all (or named) hints. With exactly one explicit package it uses `nvchecker -e ` to skip scanning the whole config; with two+ packages or no args it does one full scan. (`--hintfile` with no `-v` also queries via `nvchecker -e `.) reports outdated packages with current → latest versions, prompts per-package to update, applies updates with `nvtake`, then prompts single `slackrepo update` for all updated packages. Hints with no `[pkg]` section in `nvchecker.toml` are collected and, after the scan, a single prompt offers to populate the config via `add_nvchecker_section` (github/pypi autodetect, else stub); on accept it prints a "review and re-run" message and stops the run without applying updates. Packages whose `.info` is not found in `REPO_DIR` are skipped. - `--no-dl` / `-N`: downloads and recalculates checksums as normal, then appends `NODOWNLOAD=yes` after `MD5SUM_x86_64=`. Works with `--hintfile` or `--new`. Error if used alone. - `--delete` / `-d`: removes hint file and `.bak` if present. Accepts multiple package names. Exits 2 on first missing file. diff --git a/mkhint b/mkhint index 8295c09..9c8852e 100755 --- a/mkhint +++ b/mkhint @@ -52,6 +52,7 @@ Usage: ./mkhint --check [FILE...] Check all (or named) hints for upstream updates ./mkhint --list List hint files ./mkhint --review Review hints matching SBo version, keep/delete each + ./mkhint --review FILE... Review named hints (any version), keep/delete each ./mkhint --clean Remove .bak files from HINT_DIR ./mkhint --no-dl --hintfile FILE Update hint, skip downloads, add NODOWNLOAD=yes ./mkhint --no-dl --new FILE Create hint with NODOWNLOAD=yes @@ -62,7 +63,7 @@ Options: --hintfile, -f FILE Path to existing hint file (required with --version) --new, -n FILE Create new hint file (required with --version or standalone) --list, -l List all hint files in the default directory - --review, -R Review hints whose version matches the SBo .info; diff + keep/delete + --review, -R [FILE...] Review hints; no args = matched only, FILE... = named hints (any version) --clean, -c Remove all .bak files from HINT_DIR --check, -C [FILE...] Check hints for upstream updates via nvchecker, update interactively --delete, -d FILE Delete a hint file (and .bak if present) -- cgit v1.2.3