Expand description
Replace everywhere: swap one part (or one revision of it) for another in every assembly that uses it, driven by where-used.
§What it touches
Only DIRECT parents — the revisions whose own uses list names the old part. Grandparents use the parent, not the old part, and a parent’s new revision is theirs to pick up (or not) through their own references.
By default every CURRENT parent revision is a candidate: one in work, or a part’s current release. Superseded and obsolete revisions are history and are never rewritten. The caller may narrow the set to named revisions.
§How each parent is written (replace-everywhere defaults)
- A parent revision in work is edited in place, in one locked write. If another user holds its lock the row is refused; if nobody does, the write happens without taking the lock (it is a check-out, write and check-in in one transaction). A lock the caller holds stays held.
- A released parent gets a NEW revision (the suggested label), which starts from the release like any new revision and is left checked in. If that part already has a revision in work, the released row is SKIPPED: the revision in work is where the part is being changed, and it is a row of its own when it still uses the old part. Nothing is merged into it.
§Which lines change
A line naming the old part changes when it names the revision being replaced — any revision, when none is given. A FLOATING line (no pinned revision) changes only when the whole part is being replaced; replacing one revision leaves floating lines alone, since they follow the part’s releases and never pointed at that revision in particular. The new line keeps the quantity, unit, find number, reference and notes, and names the replacement pinned to the revision asked for, or floating when none is.
Each parent is its own write, so one refusal leaves the others done; the report says what happened to each, like a family Generate. A dry run computes the same report from the store as it stands and writes nothing.
Structs§
- Line
Change - One changed line: what it named, and what it will name.
- Replace
Report - Replace
Request - What the caller asks for.
- Replace
Row - What happened (or would happen) to one parent revision.