diff options
Diffstat (limited to 'yarns')
-rw-r--r-- | yarns/branches-workspaces.yarn | 22 | ||||
-rw-r--r-- | yarns/implementations.yarn | 16 |
2 files changed, 33 insertions, 5 deletions
diff --git a/yarns/branches-workspaces.yarn b/yarns/branches-workspaces.yarn index 15d31cb1..c3b73ee3 100644 --- a/yarns/branches-workspaces.yarn +++ b/yarns/branches-workspaces.yarn @@ -197,6 +197,12 @@ purposes. THEN in branch foo, stratum test-stratum refs test-chunk in foo AND the edited chunk test:test-chunk has git branch foo +Editing a morphology should not cause it to start having repo or ref +fields when referring to strata, when it didn't before. + + AND in branch foo, system test-system refers to test-stratum without repo + AND in branch foo, system test-system refers to test-stratum without ref + Morph edit should only work with a system argument. SCENARIO morph edit errors when supplied only a stratum and chunk as arguments @@ -267,9 +273,25 @@ unpetrify and verify that we have all the same refs as before. AND remembering all refs in foo AND petrifying foo THEN foo is petrified + +Petrifying a morphology should not cause it to start having repo or ref +fields when referring to strata, when it didn't before. + + AND in branch foo, system test-system refers to test-stratum without repo + AND in branch foo, system test-system refers to test-stratum without ref + +Unpetrify must put the morphologies back in the same logical state they +were in before. + WHEN unpetrifying foo THEN foo refs are as remembered +Unpetrifying a morphology should not cause it to start having repo or +ref fields when referring to strata, when it didn't before. + + AND in branch foo, system test-system refers to test-stratum without repo + AND in branch foo, system test-system refers to test-stratum without ref + Tagging system branches ----------------------- diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index 2a46dfa2..ccebabca 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -409,14 +409,20 @@ Report system branch root repository. Editing morphologies with `morph edit`. - IMPLEMENTS THEN in branch (\S+), (system|stratum) (\S+) refs (\S+) in (\S+) - if [ $MATCH_2 == system ]; then set strata; else set chunks; fi + IMPLEMENTS THEN in branch (\S+), stratum (\S+) refs (\S+) in (\S+) "$SRCDIR/scripts/yaml-extract" \ - "$DATADIR/workspace/$MATCH_1/test:morphs/$MATCH_3.morph" \ - $@ name="$MATCH_4" ref > "$DATADIR/ref.actual" - echo "$MATCH_5" > "$DATADIR/ref.wanted" + "$DATADIR/workspace/$MATCH_1/test:morphs/$MATCH_2.morph" \ + chunks name="$MATCH_3" ref > "$DATADIR/ref.actual" + echo "$MATCH_4" > "$DATADIR/ref.wanted" diff -u "$DATADIR/ref.wanted" "$DATADIR/ref.actual" + IMPLEMENTS THEN in branch (\S+), (system|stratum) (\S+) refers to (\S+) without (\S+) + if [ $MATCH_2 == system ]; then field=strata; else field=build-depends; fi + { ! "$SRCDIR/scripts/yaml-extract" \ + "$DATADIR/workspace/$MATCH_1/test:morphs/$MATCH_3.morph" \ + "$field" name="$MATCH_4" "$MATCH_5"; } 2>&1 | + grep -qFe "Object does not contain $MATCH_5" + IMPLEMENTS WHEN the user edits the stratum (\S+) in the system (\S+) in branch (\S+) cd "$DATADIR/workspace/$MATCH_3/test:morphs" run_morph edit "$MATCH_2" "$MATCH_1" |