summaryrefslogtreecommitdiff
path: root/tests.branching
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2012-11-14 16:51:48 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2012-11-14 17:02:58 +0000
commit70564c6457b732e1dd35384971da5df3c5a1665b (patch)
treefec929625b46df3eca62f4f316bef90f6128c51a /tests.branching
parent4a2b2aa38b85971b72c925eea5ca18767c63cc50 (diff)
downloadmorph-70564c6457b732e1dd35384971da5df3c5a1665b.tar.gz
Tidy up command tests
Be consistent about placement of test description, blank lines, etc.
Diffstat (limited to 'tests.branching')
-rwxr-xr-xtests.branching/ambiguous-refs.script5
-rwxr-xr-xtests.branching/branch-cleans-up-on-failure.script6
-rwxr-xr-xtests.branching/branch-creates-new-system-branch-not-from-master.script4
-rwxr-xr-xtests.branching/branch-creates-new-system-branch.script4
-rwxr-xr-xtests.branching/branch-fails-if-branch-exists.script6
-rwxr-xr-xtests.branching/branch-when-branchdir-exists-locally.script6
-rwxr-xr-xtests.branching/branch-works-anywhere.script4
-rwxr-xr-xtests.branching/checkout-cleans-up-on-failure.script6
-rwxr-xr-xtests.branching/checkout-existing-branch.script5
-rwxr-xr-xtests.branching/checkout-non-aliased-repos.script11
-rwxr-xr-xtests.branching/checkout-works-anywhere.script4
-rwxr-xr-xtests.branching/edit-checkouts-existing-chunk.script4
-rwxr-xr-xtests.branching/edit-clones-chunk.script4
-rwxr-xr-xtests.branching/edit-handles-submodules.script6
-rwxr-xr-xtests.branching/edit-updates-stratum.script4
-rwxr-xr-xtests.branching/edit-uses-ref-from-stratum.script4
-rwxr-xr-xtests.branching/edit-works-after-branch-root-was-renamed.script8
-rwxr-xr-xtests.branching/foreach-handles-command-failure.script4
-rwxr-xr-xtests.branching/foreach-handles-full-urls.script3
-rwxr-xr-xtests.branching/init-cwd.script5
-rwxr-xr-xtests.branching/init-default.script5
-rwxr-xr-xtests.branching/init-existing.script7
-rwxr-xr-xtests.branching/init-newdir.script7
-rwxr-xr-xtests.branching/init-nonempty.script7
-rwxr-xr-xtests.branching/morph-repository-stored-in-cloned-repositories.script10
-rwxr-xr-xtests.branching/petrify-no-double-petrify.script6
-rwxr-xr-xtests.branching/petrify.script7
-rwxr-xr-xtests.branching/show-branch-root-in-branched-branch.script6
-rwxr-xr-xtests.branching/show-branch-root-in-checked-out-branch.script6
-rwxr-xr-xtests.branching/show-branch-root-with-repo-url.script6
-rwxr-xr-xtests.branching/show-system-branch-fails-outside-workspace.script6
-rwxr-xr-xtests.branching/show-system-branch-fails-when-branch-is-ambiguous.script6
-rwxr-xr-xtests.branching/show-system-branch-works-anywhere-with-a-single-branch.script6
-rwxr-xr-xtests.branching/show-system-branch-works-in-different-directories-in-a-branch.script6
-rwxr-xr-xtests.branching/status-in-clean-branch.script3
-rwxr-xr-xtests.branching/status-in-dirty-branch.script3
-rwxr-xr-xtests.branching/status-in-workspace.script3
-rwxr-xr-xtests.branching/workflow-petrify.script6
-rwxr-xr-xtests.branching/workflow-separate-stratum-repos.script7
-rwxr-xr-xtests.branching/workflow.script5
-rwxr-xr-xtests.branching/workspace-not-found.script4
-rwxr-xr-xtests.branching/workspace.script4
42 files changed, 132 insertions, 97 deletions
diff --git a/tests.branching/ambiguous-refs.script b/tests.branching/ambiguous-refs.script
index 3b2ec5e8..a93c4b66 100755
--- a/tests.branching/ambiguous-refs.script
+++ b/tests.branching/ambiguous-refs.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,8 +16,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# 'git show-ref master' sorts its output alphabetically, so we can't rely on
-# it to resolve 'master': we might get 'alpha/master' instead.
+## 'git show-ref master' sorts its output alphabetically, so we can't rely on
+## it to resolve 'master': we might get 'alpha/master' instead.
set -eu
diff --git a/tests.branching/branch-cleans-up-on-failure.script b/tests.branching/branch-cleans-up-on-failure.script
index 5e358fb9..55666137 100755
--- a/tests.branching/branch-cleans-up-on-failure.script
+++ b/tests.branching/branch-cleans-up-on-failure.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,8 +15,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# If a command fails, the state of the workspace should be as if the command
-# was never run
+
+## If a command fails, the state of the workspace should be as if the command
+## was never run
set -eu
diff --git a/tests.branching/branch-creates-new-system-branch-not-from-master.script b/tests.branching/branch-creates-new-system-branch-not-from-master.script
index 2ddc053a..72e21740 100755
--- a/tests.branching/branch-creates-new-system-branch-not-from-master.script
+++ b/tests.branching/branch-creates-new-system-branch-not-from-master.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,7 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Make sure "morph branch" creates a new system branch.
+
+## Make sure "morph branch" creates a new system branch.
set -eu
diff --git a/tests.branching/branch-creates-new-system-branch.script b/tests.branching/branch-creates-new-system-branch.script
index 35b50f7c..c2d7f640 100755
--- a/tests.branching/branch-creates-new-system-branch.script
+++ b/tests.branching/branch-creates-new-system-branch.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,7 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Make sure "morph branch" creates a new system branch.
+
+## Make sure "morph branch" creates a new system branch.
set -eu
diff --git a/tests.branching/branch-fails-if-branch-exists.script b/tests.branching/branch-fails-if-branch-exists.script
index 1ae92d30..8a7da8ab 100755
--- a/tests.branching/branch-fails-if-branch-exists.script
+++ b/tests.branching/branch-fails-if-branch-exists.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,8 +15,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Make sure "morph branch" fails if the system branch already exists in the
-# branch root (morphologies repo).
+
+## Make sure "morph branch" fails if the system branch already exists in the
+## branch root (morphologies repo).
set -eu
diff --git a/tests.branching/branch-when-branchdir-exists-locally.script b/tests.branching/branch-when-branchdir-exists-locally.script
index 318f1b37..66a116be 100755
--- a/tests.branching/branch-when-branchdir-exists-locally.script
+++ b/tests.branching/branch-when-branchdir-exists-locally.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,8 +15,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Make sure "morph branch" fails when the system branch directory already
-# exists.
+
+## Make sure "morph branch" fails when the system branch directory already
+## exists.
set -eu
diff --git a/tests.branching/branch-works-anywhere.script b/tests.branching/branch-works-anywhere.script
index 5198d7f4..ee8f5bfa 100755
--- a/tests.branching/branch-works-anywhere.script
+++ b/tests.branching/branch-works-anywhere.script
@@ -1,4 +1,5 @@
#!/bin/bash
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,7 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Make sure "morph branch" works anywhere in a workspace or system branch.
+
+## Make sure "morph branch" works anywhere in a workspace or system branch.
set -eu
diff --git a/tests.branching/checkout-cleans-up-on-failure.script b/tests.branching/checkout-cleans-up-on-failure.script
index fe80770f..a0b0411b 100755
--- a/tests.branching/checkout-cleans-up-on-failure.script
+++ b/tests.branching/checkout-cleans-up-on-failure.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,8 +15,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# If a command fails, the state of the workspace should be as if the command
-# was never run
+
+## If a command fails, the state of the workspace should be as if the command
+## was never run
set -eu
diff --git a/tests.branching/checkout-existing-branch.script b/tests.branching/checkout-existing-branch.script
index 310b9f42..653fffb5 100755
--- a/tests.branching/checkout-existing-branch.script
+++ b/tests.branching/checkout-existing-branch.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,12 +16,10 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Verify that "morph checkout test:morphs master" works.
-
+## Verify that "morph checkout test:morphs master" works.
set -eu
-
cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" checkout test:morphs master
diff --git a/tests.branching/checkout-non-aliased-repos.script b/tests.branching/checkout-non-aliased-repos.script
index b98add2c..b52f6675 100755
--- a/tests.branching/checkout-non-aliased-repos.script
+++ b/tests.branching/checkout-non-aliased-repos.script
@@ -1,4 +1,5 @@
#!/bin/bash
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,15 +16,13 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Verify that "morph checkout" works with repos that are not aliased.
-# This test in particular verifies that URI schemes are stripped off
-# and that the .git suffix is only removed at the end if it is actually
-# present.
-
+## Verify that "morph checkout" works with repos that are not aliased.
+## This test in particular verifies that URI schemes are stripped off
+## and that the .git suffix is only removed at the end if it is actually
+## present.
set -eu
-
REPO_WITH_SUFFIX="file://$DATADIR/morphs.git"
REPO_WITHOUT_SUFFIX="file://$DATADIR/morphs"
diff --git a/tests.branching/checkout-works-anywhere.script b/tests.branching/checkout-works-anywhere.script
index c7d046e4..02deb4d7 100755
--- a/tests.branching/checkout-works-anywhere.script
+++ b/tests.branching/checkout-works-anywhere.script
@@ -1,4 +1,5 @@
#!/bin/bash
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,7 +15,8 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Make sure "morph checkout" works anywhere in a workspace or system branch.
+
+## Make sure "morph checkout" works anywhere in a workspace or system branch.
set -eu
diff --git a/tests.branching/edit-checkouts-existing-chunk.script b/tests.branching/edit-checkouts-existing-chunk.script
index 814b128f..a10a72d1 100755
--- a/tests.branching/edit-checkouts-existing-chunk.script
+++ b/tests.branching/edit-checkouts-existing-chunk.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,8 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Verify that "morph edit" clones a chunk repository into a system branch.
-
+## Verify that "morph edit" clones a chunk repository into a system branch.
set -eu
diff --git a/tests.branching/edit-clones-chunk.script b/tests.branching/edit-clones-chunk.script
index 27440816..1b6b8a04 100755
--- a/tests.branching/edit-clones-chunk.script
+++ b/tests.branching/edit-clones-chunk.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,8 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Verify that "morph edit" clones a chunk repository into a system branch.
-
+## Verify that "morph edit" clones a chunk repository into a system branch.
set -eu
diff --git a/tests.branching/edit-handles-submodules.script b/tests.branching/edit-handles-submodules.script
index bbe86c1f..d164facc 100755
--- a/tests.branching/edit-handles-submodules.script
+++ b/tests.branching/edit-handles-submodules.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,8 +15,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# 'morph edit' should set up git URL rewriting correctly so that submodule
-# commands function as usual, despite our prefixing and mirroring.
+
+## 'morph edit' should set up git URL rewriting correctly so that submodule
+## commands function as usual, despite our prefixing and mirroring.
set -eu
diff --git a/tests.branching/edit-updates-stratum.script b/tests.branching/edit-updates-stratum.script
index 8b6af1d1..c2716cab 100755
--- a/tests.branching/edit-updates-stratum.script
+++ b/tests.branching/edit-updates-stratum.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,8 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Verify that "morph edit" clones a chunk repository into a system branch.
-
+## Verify that "morph edit" clones a chunk repository into a system branch.
set -eu
diff --git a/tests.branching/edit-uses-ref-from-stratum.script b/tests.branching/edit-uses-ref-from-stratum.script
index f62dd73e..b933996b 100755
--- a/tests.branching/edit-uses-ref-from-stratum.script
+++ b/tests.branching/edit-uses-ref-from-stratum.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,8 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Verify that "morph edit" clones a chunk repository into a system branch.
-
+## Verify that "morph edit" clones a chunk repository into a system branch.
set -eu
diff --git a/tests.branching/edit-works-after-branch-root-was-renamed.script b/tests.branching/edit-works-after-branch-root-was-renamed.script
index b6eaa729..5e298d93 100755
--- a/tests.branching/edit-works-after-branch-root-was-renamed.script
+++ b/tests.branching/edit-works-after-branch-root-was-renamed.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,9 +15,10 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Verify that the branch root repository created by "morph branch" or
-# "morph checkout" can be renamed and "morph edit" still finds the
-# branch root repo and works.
+
+## Verify that the branch root repository created by "morph branch" or
+## "morph checkout" can be renamed and "morph edit" still finds the
+## branch root repo and works.
set -eu
diff --git a/tests.branching/foreach-handles-command-failure.script b/tests.branching/foreach-handles-command-failure.script
index 00d27659..eea381c8 100755
--- a/tests.branching/foreach-handles-command-failure.script
+++ b/tests.branching/foreach-handles-command-failure.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,8 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Verify that "morph foreach" deals with failure in a grown-up way
-
+## Verify that "morph foreach" deals with failure in a grown-up way
set -eu
diff --git a/tests.branching/foreach-handles-full-urls.script b/tests.branching/foreach-handles-full-urls.script
index cfe68704..6e0b14ec 100755
--- a/tests.branching/foreach-handles-full-urls.script
+++ b/tests.branching/foreach-handles-full-urls.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# morph foreach: should not break if we used a full URL for a repo
+## morph foreach: should not break if we used a full URL for a repo
set -eu
diff --git a/tests.branching/init-cwd.script b/tests.branching/init-cwd.script
index 2d14586c..10dd0cc7 100755
--- a/tests.branching/init-cwd.script
+++ b/tests.branching/init-cwd.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +16,9 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-set -eu
+## Test that "morph init" works for the current working directory.
-# Test that "morph init" works for the current working directory.
+set -eu
cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init .
diff --git a/tests.branching/init-default.script b/tests.branching/init-default.script
index de4627e7..da67828f 100755
--- a/tests.branching/init-default.script
+++ b/tests.branching/init-default.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +16,9 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-set -eu
+## Test that "morph init" works without an explicit argument.
-# Test that "morph init" works without an explicit argument.
+set -eu
cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
diff --git a/tests.branching/init-existing.script b/tests.branching/init-existing.script
index e713b9df..506e94bb 100755
--- a/tests.branching/init-existing.script
+++ b/tests.branching/init-existing.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,10 +16,10 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-set -eu
+## Test that "morph init" works when given the name of an existing,
+## empty directory.
-# Test that "morph init" works when given the name of an existing,
-# empty directory.
+set -eu
"$SRCDIR/scripts/test-morph" init "$DATADIR/workspace"
"$SRCDIR/scripts/list-tree" "$DATADIR/workspace"
diff --git a/tests.branching/init-newdir.script b/tests.branching/init-newdir.script
index 5e79ce87..1f505d92 100755
--- a/tests.branching/init-newdir.script
+++ b/tests.branching/init-newdir.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,10 +16,10 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-set -eu
+## Test that "morph init" works if given a directory that
+## does not exist yet.
-# Test that "morph init" works if given a directory that
-# does not exist yet.
+set -eu
"$SRCDIR/scripts/test-morph" init "$DATADIR/foo"
"$SRCDIR/scripts/list-tree" "$DATADIR/foo"
diff --git a/tests.branching/init-nonempty.script b/tests.branching/init-nonempty.script
index 959da028..c5c1947c 100755
--- a/tests.branching/init-nonempty.script
+++ b/tests.branching/init-nonempty.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,10 +16,10 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-set -eu
+## Test that "morph init" fails when given the name of an existing,
+## non-empty directory.
-# Test that "morph init" fails when given the name of an existing,
-# non-empty directory.
+set -eu
touch "$DATADIR/workspace/foo"
"$SRCDIR/scripts/test-morph" init "$DATADIR/workspace"
diff --git a/tests.branching/morph-repository-stored-in-cloned-repositories.script b/tests.branching/morph-repository-stored-in-cloned-repositories.script
index 68edbad6..c2dc8690 100755
--- a/tests.branching/morph-repository-stored-in-cloned-repositories.script
+++ b/tests.branching/morph-repository-stored-in-cloned-repositories.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,10 +15,11 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Verify that morph branch/checkout/edit create repositories that have
-# a "git config morph.repository" option set so that we can
-# identify these repositories later even when the user has renamed or
-# moved their local directories.
+
+## Verify that morph branch/checkout/edit create repositories that have
+## a "git config morph.repository" option set so that we can
+## identify these repositories later even when the user has renamed or
+## moved their local directories.
set -eu
diff --git a/tests.branching/petrify-no-double-petrify.script b/tests.branching/petrify-no-double-petrify.script
index 1b5289c4..25c977b6 100755
--- a/tests.branching/petrify-no-double-petrify.script
+++ b/tests.branching/petrify-no-double-petrify.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,12 +16,11 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# It should be impossible to lose the original refs, or we risk making
-# unpetrify impossible.
+## It should be impossible to lose the original refs, or we risk making
+## unpetrify impossible.
set -eu
-
# Disable test on versions of Python before 2.7.
. "$SRCDIR/scripts/python-check"
diff --git a/tests.branching/petrify.script b/tests.branching/petrify.script
index 0fb4a4c4..6b6581d3 100755
--- a/tests.branching/petrify.script
+++ b/tests.branching/petrify.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,13 +16,11 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Verify "morph petrify", and ensure it doesn't petrify chunks that have
-# already been edited.
-
+## Verify "morph petrify", and ensure it doesn't petrify chunks that have
+## already been edited.
set -eu
-
# Disable test on versions of Python before 2.7.
. "$SRCDIR/scripts/python-check"
diff --git a/tests.branching/show-branch-root-in-branched-branch.script b/tests.branching/show-branch-root-in-branched-branch.script
index c1798d78..4598d6a9 100755
--- a/tests.branching/show-branch-root-in-branched-branch.script
+++ b/tests.branching/show-branch-root-in-branched-branch.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +16,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Check that 'morph show-branch-root' works when being run in a
-# local system branch created using 'morph branch ...'.
-
+## Check that 'morph show-branch-root' works when being run in a
+## local system branch created using 'morph branch ...'.
set -eu
diff --git a/tests.branching/show-branch-root-in-checked-out-branch.script b/tests.branching/show-branch-root-in-checked-out-branch.script
index dfc08edb..97f892b9 100755
--- a/tests.branching/show-branch-root-in-checked-out-branch.script
+++ b/tests.branching/show-branch-root-in-checked-out-branch.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +16,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Check that 'morph show-branch-root' works when being run in a
-# local system branch created using 'morph checkout ...'.
-
+## Check that 'morph show-branch-root' works when being run in a
+## local system branch created using 'morph checkout ...'.
set -eu
diff --git a/tests.branching/show-branch-root-with-repo-url.script b/tests.branching/show-branch-root-with-repo-url.script
index 1470e0a6..5480c3ef 100755
--- a/tests.branching/show-branch-root-with-repo-url.script
+++ b/tests.branching/show-branch-root-with-repo-url.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +16,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Check that 'morph show-branch-root' works when being run in a
-# local system branch created from a full repository URL.
-
+## Check that 'morph show-branch-root' works when being run in a
+## local system branch created from a full repository URL.
set -eu
diff --git a/tests.branching/show-system-branch-fails-outside-workspace.script b/tests.branching/show-system-branch-fails-outside-workspace.script
index 228e03d9..d227d5b0 100755
--- a/tests.branching/show-system-branch-fails-outside-workspace.script
+++ b/tests.branching/show-system-branch-fails-outside-workspace.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +16,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Check that 'morph show-system-branch' fails when being run
-# outside a workspace.
-
+## Check that 'morph show-system-branch' fails when being run
+## outside a workspace.
set -eu
diff --git a/tests.branching/show-system-branch-fails-when-branch-is-ambiguous.script b/tests.branching/show-system-branch-fails-when-branch-is-ambiguous.script
index 58143526..12e23147 100755
--- a/tests.branching/show-system-branch-fails-when-branch-is-ambiguous.script
+++ b/tests.branching/show-system-branch-fails-when-branch-is-ambiguous.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +16,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Check that 'morph show-system-branch' fails when the system branch
-# is not obvious.
-
+## Check that 'morph show-system-branch' fails when the system branch
+## is not obvious.
set -eu
diff --git a/tests.branching/show-system-branch-works-anywhere-with-a-single-branch.script b/tests.branching/show-system-branch-works-anywhere-with-a-single-branch.script
index 1b4af8bd..800a8e5b 100755
--- a/tests.branching/show-system-branch-works-anywhere-with-a-single-branch.script
+++ b/tests.branching/show-system-branch-works-anywhere-with-a-single-branch.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +16,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Check that 'morph show-system-branch' works even outside a branch
-# if there only is one in the workspcae.
-
+## Check that 'morph show-system-branch' works even outside a branch
+## if there only is one in the workspcae.
set -eu
diff --git a/tests.branching/show-system-branch-works-in-different-directories-in-a-branch.script b/tests.branching/show-system-branch-works-in-different-directories-in-a-branch.script
index c19e4093..d89e671c 100755
--- a/tests.branching/show-system-branch-works-in-different-directories-in-a-branch.script
+++ b/tests.branching/show-system-branch-works-in-different-directories-in-a-branch.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +16,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Check that 'morph show-system-branch' shows the name of the
-# current system branch correctly from various working directories.
-
+## Check that 'morph show-system-branch' shows the name of the
+## current system branch correctly from various working directories.
set -eu
diff --git a/tests.branching/status-in-clean-branch.script b/tests.branching/status-in-clean-branch.script
index ec496128..335db9f9 100755
--- a/tests.branching/status-in-clean-branch.script
+++ b/tests.branching/status-in-clean-branch.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2011, 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# 'morph status' within a branch
+## 'morph status' within a branch
set -eu
diff --git a/tests.branching/status-in-dirty-branch.script b/tests.branching/status-in-dirty-branch.script
index 18aaf61e..c36a0500 100755
--- a/tests.branching/status-in-dirty-branch.script
+++ b/tests.branching/status-in-dirty-branch.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2011, 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# 'morph status' within a branch
+## 'morph status' within a branch
set -eu
diff --git a/tests.branching/status-in-workspace.script b/tests.branching/status-in-workspace.script
index 63014aee..e998c097 100755
--- a/tests.branching/status-in-workspace.script
+++ b/tests.branching/status-in-workspace.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2011, 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,7 +16,7 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# 'morph status' within a workspace
+## 'morph status' within a workspace
set -eu
diff --git a/tests.branching/workflow-petrify.script b/tests.branching/workflow-petrify.script
index 35643012..b84dd977 100755
--- a/tests.branching/workflow-petrify.script
+++ b/tests.branching/workflow-petrify.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,9 +16,8 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Do a complete workflow test, with strata outside the main morphologies
-# repository.
-
+## Do a complete workflow test, with strata outside the main morphologies
+## repository.
set -eu
diff --git a/tests.branching/workflow-separate-stratum-repos.script b/tests.branching/workflow-separate-stratum-repos.script
index 97ddb95d..ed549326 100755
--- a/tests.branching/workflow-separate-stratum-repos.script
+++ b/tests.branching/workflow-separate-stratum-repos.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,13 +16,11 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Do a complete workflow test, with strata outside the main morphologies
-# repository.
-
+## Do a complete workflow test, with strata outside the main morphologies
+## repository.
set -eu
-
. "$SRCDIR/scripts/setup-3rd-party-strata"
# Make a change to the system
diff --git a/tests.branching/workflow.script b/tests.branching/workflow.script
index 56415ce4..10383132 100755
--- a/tests.branching/workflow.script
+++ b/tests.branching/workflow.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -15,12 +16,10 @@
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-# Do a complete workflow test with Morph branching and merging.
-
+## Do a complete workflow test with Morph branching and merging.
set -eu
-
cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" branch test:morphs me/readme-fix
diff --git a/tests.branching/workspace-not-found.script b/tests.branching/workspace-not-found.script
index 690f45d3..9e9b5d75 100755
--- a/tests.branching/workspace-not-found.script
+++ b/tests.branching/workspace-not-found.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,6 +15,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+## Handle being run from outside workspace directory.
+
scripts/test-morph init "$DATADIR/workspace"
cd "$DATADIR"
"$SRCDIR/scripts/test-morph" workspace
diff --git a/tests.branching/workspace.script b/tests.branching/workspace.script
index f872a37d..e717873c 100755
--- a/tests.branching/workspace.script
+++ b/tests.branching/workspace.script
@@ -1,4 +1,5 @@
#!/bin/sh
+#
# Copyright (C) 2012 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
@@ -14,6 +15,9 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+## morph init: Create a workspace.
+
scripts/test-morph init "$DATADIR/workspace"
mkdir -p "$DATADIR/workspace/a/b/c"
cd "$DATADIR/workspace/a/b/c"