summaryrefslogtreecommitdiff
path: root/tests.branching
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-17 15:18:24 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-09-17 18:46:38 +0100
commitd08d0afa388c8767a2e6eb13b8ba0c53e531e23f (patch)
treeba986d0a282f141c10bd98a23dff1bdc3a55b8e3 /tests.branching
parentad437ca48f49c0d5a8581a73175d38afc9d3f973 (diff)
downloadmorph-d08d0afa388c8767a2e6eb13b8ba0c53e531e23f.tar.gz
Update branching tests to use 'morph foreach'
Diffstat (limited to 'tests.branching')
-rwxr-xr-xtests.branching/edit-checkouts-existing-chunk.script9
-rw-r--r--tests.branching/edit-checkouts-existing-chunk.stdout7
-rwxr-xr-xtests.branching/edit-clones-chunk.script25
-rw-r--r--tests.branching/edit-clones-chunk.stdout17
4 files changed, 27 insertions, 31 deletions
diff --git a/tests.branching/edit-checkouts-existing-chunk.script b/tests.branching/edit-checkouts-existing-chunk.script
index bc1650b7..5e0d7bc9 100755
--- a/tests.branching/edit-checkouts-existing-chunk.script
+++ b/tests.branching/edit-checkouts-existing-chunk.script
@@ -26,13 +26,12 @@ cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" checkout baserock:morphs alfred
# Edit the hello chunk in alfred.
+cd "alfred"
"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
-echo "Current branches, morphs:"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/workspace/alfred/baserock:morphs" branch
-
-echo "Current branches, hello:"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/workspace/alfred/baserock:hello" branch
+echo "Current branches:"
+"$SRCDIR/scripts/test-morph" foreach git branch
+echo
echo "Files in hello:"
ls "$DATADIR/workspace/alfred/baserock:hello"
diff --git a/tests.branching/edit-checkouts-existing-chunk.stdout b/tests.branching/edit-checkouts-existing-chunk.stdout
index fd549010..77f8fcd7 100644
--- a/tests.branching/edit-checkouts-existing-chunk.stdout
+++ b/tests.branching/edit-checkouts-existing-chunk.stdout
@@ -1,7 +1,10 @@
-Current branches, morphs:
+Current branches:
+baserock:morphs
* alfred
-Current branches, hello:
+
+baserock:hello
* alfred
master
+
Files in hello:
hello.morph
diff --git a/tests.branching/edit-clones-chunk.script b/tests.branching/edit-clones-chunk.script
index db138e59..aef40807 100755
--- a/tests.branching/edit-clones-chunk.script
+++ b/tests.branching/edit-clones-chunk.script
@@ -28,21 +28,10 @@ cd "$DATADIR/workspace"
# Edit chunk.
"$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello
-echo "Current branches, morphs:"
-"$SRCDIR/scripts/run-git-in" \
- "$DATADIR/workspace/newbranch/baserock:morphs" branch
-
-echo "Current origin, morphs:"
-"$SRCDIR/scripts/run-git-in" \
- "$DATADIR/workspace/newbranch/baserock:morphs" \
- remote show origin | \
- sed 's,\(TMP/workspace/\.morph/cache/gits/file_\).*_,\1,g'
-
-echo "Current branches, hello:"
-"$SRCDIR/scripts/run-git-in" \
- "$DATADIR/workspace/newbranch/baserock:hello" branch
-
-echo "Current origin, hello:"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/workspace/newbranch/baserock:hello" \
- remote show origin | \
- sed 's,\(TMP/workspace/\.morph/cache/gits/file_\).*_,\1,g'
+echo "Current branches:"
+"$SRCDIR/scripts/test-morph" foreach git branch
+
+echo
+echo "Current origins:"
+"$SRCDIR/scripts/test-morph" foreach git remote show origin | \
+ sed 's,\(TMP/workspace/\.morph/cache/gits/file_\).*_,\1,g'
diff --git a/tests.branching/edit-clones-chunk.stdout b/tests.branching/edit-clones-chunk.stdout
index c712f0bf..ea7133f5 100644
--- a/tests.branching/edit-clones-chunk.stdout
+++ b/tests.branching/edit-clones-chunk.stdout
@@ -1,7 +1,14 @@
-Current branches, morphs:
+Current branches:
+baserock:morphs
master
* newbranch
-Current origin, morphs:
+
+baserock:hello
+ master
+* newbranch
+
+Current origins:
+baserock:morphs
* remote origin
Fetch URL: file://TMP/morphs
Push URL: file://TMP/morphs
@@ -13,10 +20,8 @@ Current origin, morphs:
master merges with remote master
Local ref configured for 'git push':
master pushes to master (up to date)
-Current branches, hello:
- master
-* newbranch
-Current origin, hello:
+
+baserock:hello
* remote origin
Fetch URL: file://TMP/hello
Push URL: file://TMP/hello