rig 3.26.1
A work always lands in the data root that holds it (#227)
A work always lands in the data root that holds it
Tickets: #104, #170, #107, #154
Direction
Four fixes to one question, which data root a command is in, each its own stage stacked on the work branch.
- #104,
rig updatewith nothing selected.updategathers its location the waydoctordoes: catch the refusal and fall back to the tool checkout, so the tool, every configured root and the freshness cache still move.updatedoes not say the refusal itself. It ends in the doctor checks, which already say it word for word and count it, so saying it inupdatetoo would say it twice. - #170, placement by org.
repoAtCwdnames a repoorg/repofrom its remote, androotsCataloguingmatchescatalog/<org>/<repo>.mdwhen the name carries an org; a bare name (a folder with no origin,--repos) matches any org as today. Standing in a configured data root's own checkout places the command in that root, asked after--reposand before the repo at the cwd. The Jira-key placement is left out unless it stays small. - #154 item 6 only (part of #154, never closes it).
describecarries the upstream the branch's config names even when its ref is not here.prepareDataRootandupdateCheckoutfetch when one is configured but missing before concluding "no upstream", and doctor stops telling such a root to push to a private repo. - #107, the work folder's marker.
regeneratewrites.rig/dataonly when the root in hand is the one root that holds the work's record. With more than one root configured,doctorwarns about a work folder with no marker, and about one whose marker names a root that does not hold its record. Built last: it editsbin/doctor.mjs, which open PR #196 also changes.
Why not more: the Jira-key placement (#170's third point) and #154 items 2 to 5 belong to other works or later.
Planned stages
| Stage branch | Delivers | Ticket |
|---|---|---|
fix/update-without-a-current-root |
rig update brings everything forward when no root is selected |
#104 |
fix/place-a-work-by-org-and-root-checkout |
placement matches the org, and a data root's own checkout places itself | #170 |
fix/fetch-a-missing-upstream |
a data root whose upstream ref is missing fetches before saying "no upstream" (#154 item 6) | — |
fix/the-marker-names-the-root-that-holds-the-record |
the marker is written only where the record is, and doctor reports folders without one | #107 |
Stages
| Order | Stage | Delivers | Repos | PR | State |
|---|---|---|---|---|---|
| 1 | fix/update-without-a-current-root |
rig update brings the tool and every root forward when no data root is selected | rig | #203 | landed |
| 2 | fix/place-a-work-by-org-and-root-checkout |
placement matches the repo's org, and a data root's own checkout places the command in that root | rig | #206 | landed |
| 3 | fix/fetch-a-missing-upstream |
a data root whose configured upstream ref is missing locally fetches before saying no upstream (part of #154, item 6) | rig | #210 | landed |
| 4 | fix/the-marker-names-the-root-that-holds-the-record |
the work folder's marker is written only where the record is, and doctor reports a folder without one | rig | #213 | landed |
Context doc: https://github.com/hugoforte/rig-data/blob/main/work/root-placement/context.md
Full changelog: v3.26.0...v3.26.1