mix surfex.move (Surfex v0.6.2)

Copy Markdown View Source

Moves every live relation of OLD onto NEW (Surfex.Record.move/5): for each, a retire of the old relation and a relate of the same type with NEW in its place.

mix surfex.move "spec.md#Carts/Adding items" "spec.md#cart-add"
mix surfex.move "spec.md#Totals" "spec.md#Carts/Totals" --note "moved under Carts"
mix surfex.move code:MyApp.Design.render/2 code:MyApp.Design.render/3

Use it when a heading is renamed, an anchor added, a section moved, or a function renamed or its arity changed. The moved end keeps the version recorded for OLD, so a move never confirms anything: if the text changed as it moved, the relation dangles until you confirm it. mix surfex.suggest proposes moves it can see (the same version under a new id).

A retired relation comes across as retired, with its reason, unless NEW already has that relation: a rename is no reason to forget a decision.

Moving a test (a renamed module, describe or file) also carries its red_green and baseline records, when its version is unchanged. Any it leaves behind are listed: the test changed, so it earns them again.