summaryrefslogtreecommitdiff
path: root/tests.branching
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2013-09-02 13:32:47 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2013-09-05 09:46:37 +0000
commitb16e99a71980e9f10ff719d749ad8e453704ea83 (patch)
tree3084be822f8b0091eb98b0d62e168dc02b4a65b5 /tests.branching
parent400f77f81bc02c7c56f67f93d9eb53cbd08bf53d (diff)
downloadmorph-b16e99a71980e9f10ff719d749ad8e453704ea83.tar.gz
MorphSet: keep old ref as unpetrify-ref
This makes petrify much simpler, since adding unpetrify-ref is handled by MorphSet. This has the side-effect of adding unpetrify-ref when editing, but this information is also useful for this use-case. The edit tests now have different diffs and commits, so those have been updated. Also, the old merge code currently warns that now there appears to be petrified changes, since it detects if a branch is petrified by the presence of the unpetrify-ref field, even though the ref is not a SHA1. The old code does not handle undoing an edit the new way, so I did not feel it was worth attempting to comprehend it to fix this bug, which will be later fixed by the introduction of the new merge code.
Diffstat (limited to 'tests.branching')
-rw-r--r--tests.branching/edit-updates-stratum-build-depends.stdout16
-rw-r--r--tests.branching/edit-updates-stratum.stdout10
-rw-r--r--tests.branching/workflow.stdout1
3 files changed, 17 insertions, 10 deletions
diff --git a/tests.branching/edit-updates-stratum-build-depends.stdout b/tests.branching/edit-updates-stratum-build-depends.stdout
index 00b303bd..1c6eb8e3 100644
--- a/tests.branching/edit-updates-stratum-build-depends.stdout
+++ b/tests.branching/edit-updates-stratum-build-depends.stdout
@@ -1,46 +1,50 @@
diff --git a/hello-stratum.morph b/hello-stratum.morph
-index 73ed482..3731d63 100644
+index 73ed482..475fe0f 100644
--- a/hello-stratum.morph
+++ b/hello-stratum.morph
-@@ -2,7 +2,7 @@ chunks:
+@@ -2,7 +2,8 @@ chunks:
- build-depends: []
build-mode: test
name: hello
- ref: master
+ ref: newbranch
repo: test:hello
++ unpetrify-ref: master
kind: stratum
name: hello-stratum
diff --git a/hello-system.morph b/hello-system.morph
-index 721473c..94c1837 100644
+index 721473c..1537f53 100644
--- a/hello-system.morph
+++ b/hello-system.morph
-@@ -3,9 +3,8 @@ kind: system
+@@ -3,9 +3,9 @@ kind: system
name: hello-system
strata:
- morph: hello-stratum
- ref: master
+ ref: newbranch
repo: test:morphs
++ unpetrify-ref: master
- morph: xyzzy-stratum
ref: master
repo: test:morphs
-system-kind: rootfs-tarball
diff --git a/xyzzy-stratum.morph b/xyzzy-stratum.morph
-index e302037..97f7208 100644
+index e302037..bcf5b57 100644
--- a/xyzzy-stratum.morph
+++ b/xyzzy-stratum.morph
-@@ -1,11 +1,11 @@
+@@ -1,11 +1,13 @@
build-depends:
- morph: hello-stratum
- ref: master
+ ref: newbranch
repo: test:morphs
++ unpetrify-ref: master
chunks:
- build-depends: []
name: hello
- ref: master
+ ref: newbranch
repo: test:hello
++ unpetrify-ref: master
kind: stratum
name: xyzzy-stratum
diff --git a/tests.branching/edit-updates-stratum.stdout b/tests.branching/edit-updates-stratum.stdout
index e84dbe09..32eb820d 100644
--- a/tests.branching/edit-updates-stratum.stdout
+++ b/tests.branching/edit-updates-stratum.stdout
@@ -1,21 +1,22 @@
diff --git a/hello-stratum.morph b/hello-stratum.morph
-index 73ed482..3731d63 100644
+index 73ed482..475fe0f 100644
--- a/hello-stratum.morph
+++ b/hello-stratum.morph
-@@ -2,7 +2,7 @@ chunks:
+@@ -2,7 +2,8 @@ chunks:
- build-depends: []
build-mode: test
name: hello
- ref: master
+ ref: newbranch
repo: test:hello
++ unpetrify-ref: master
kind: stratum
name: hello-stratum
diff --git a/hello-system.morph b/hello-system.morph
-index b0fed3b..801a955 100644
+index b0fed3b..199c924 100644
--- a/hello-system.morph
+++ b/hello-system.morph
-@@ -3,6 +3,5 @@ kind: system
+@@ -3,6 +3,6 @@ kind: system
name: hello-system
strata:
- morph: hello-stratum
@@ -23,3 +24,4 @@ index b0fed3b..801a955 100644
+ ref: newbranch
repo: test:morphs
-system-kind: rootfs-tarball
++ unpetrify-ref: master
diff --git a/tests.branching/workflow.stdout b/tests.branching/workflow.stdout
new file mode 100644
index 00000000..65985486
--- /dev/null
+++ b/tests.branching/workflow.stdout
@@ -0,0 +1 @@
+WARNING: chunk "hello-system.hello-stratum.hello" is now petrified