summaryrefslogtreecommitdiff
path: root/tests.branching
diff options
context:
space:
mode:
authorJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-08-28 15:59:42 +0000
committerJannis Pohlmann <jannis.pohlmann@codethink.co.uk>2012-08-29 18:43:24 +0100
commit384689e00d8bed6b1e5373dda6fc407ae9d197b6 (patch)
treeca1b18173923db6955f0352e015a7eaa9c589697 /tests.branching
parentbb619f5ca782ab56dbb189f0281e8afd5025ced3 (diff)
downloadmorph-384689e00d8bed6b1e5373dda6fc407ae9d197b6.tar.gz
Rename the "morph minedir" command to "morph workspace"
Mine may be a nice metaphor but it is not very intuitive. Hence, this commit renames "mine" to "workspace". This affects not just the branch and merge plugin (the only code that changes) but also documentation and tests, which are updated along with the code in this commit. I decided to omit the "dir" suffix in the command because I think people know well that a workspace will be a directory in this case and that allows us to refer to this concept with one word ("workspace") instead of two words ("workspace directory").
Diffstat (limited to 'tests.branching')
-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-when-branchdir-exists-locally.script2
-rwxr-xr-xtests.branching/checkout-existing-branch.script2
-rwxr-xr-xtests.branching/edit-checkouts-existing-chunk.script8
-rwxr-xr-xtests.branching/edit-clones-chunk.script16
-rwxr-xr-xtests.branching/edit-updates-stratum.script2
-rwxr-xr-xtests.branching/edit-uses-ref-from-stratum.script2
-rwxr-xr-xtests.branching/init-cwd.script4
-rwxr-xr-xtests.branching/init-default.script4
-rwxr-xr-xtests.branching/init-existing.script4
-rwxr-xr-xtests.branching/init-nonempty.script4
-rw-r--r--tests.branching/init-nonempty.stderr2
-rwxr-xr-xtests.branching/merge-explicitly-named-repos.script4
-rwxr-xr-xtests.branching/minedir-not-found.script4
-rw-r--r--tests.branching/minedir-not-found.stderr2
-rwxr-xr-xtests.branching/minedir.script8
-rw-r--r--tests.branching/minedir.stdout2
-rwxr-xr-xtests.branching/petrify.script2
-rwxr-xr-xtests.branching/setup8
-rwxr-xr-xtests.branching/show-system-branch-shows-name-correctly.script2
-rwxr-xr-xtests.branching/workflow.script4
22 files changed, 48 insertions, 46 deletions
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 9ab44809..1116ae76 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
@@ -18,7 +18,7 @@
set -eu
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" branch newbranch origin/alfred
@@ -32,4 +32,4 @@ echo "Current branches:"
echo "Current origin:"
"$SRCDIR/scripts/run-git-in" newbranch/morphs remote show origin |
- sed 's,\(TMP/mine/\.morph/cache/gits/file_\).*_,\1,g'
+ sed 's,\(TMP/workspace/\.morph/cache/gits/file_\).*_,\1,g'
diff --git a/tests.branching/branch-creates-new-system-branch.script b/tests.branching/branch-creates-new-system-branch.script
index 61e9daf4..9f3b3b4f 100755
--- a/tests.branching/branch-creates-new-system-branch.script
+++ b/tests.branching/branch-creates-new-system-branch.script
@@ -18,7 +18,7 @@
set -eu
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" branch newbranch
@@ -32,4 +32,4 @@ echo "Current branches:"
echo "Current origin:"
"$SRCDIR/scripts/run-git-in" newbranch/morphs remote show origin |
- sed 's,\(TMP/mine/\.morph/cache/gits/file_\).*_,\1,g'
+ sed 's,\(TMP/workspace/\.morph/cache/gits/file_\).*_,\1,g'
diff --git a/tests.branching/branch-when-branchdir-exists-locally.script b/tests.branching/branch-when-branchdir-exists-locally.script
index 4692b5f6..27d32062 100755
--- a/tests.branching/branch-when-branchdir-exists-locally.script
+++ b/tests.branching/branch-when-branchdir-exists-locally.script
@@ -19,7 +19,7 @@
set -eu
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
mkdir newbranch
diff --git a/tests.branching/checkout-existing-branch.script b/tests.branching/checkout-existing-branch.script
index 74941e18..54697a1d 100755
--- a/tests.branching/checkout-existing-branch.script
+++ b/tests.branching/checkout-existing-branch.script
@@ -21,7 +21,7 @@
set -eu
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" checkout master
diff --git a/tests.branching/edit-checkouts-existing-chunk.script b/tests.branching/edit-checkouts-existing-chunk.script
index 4e88ec7c..a3a8d01e 100755
--- a/tests.branching/edit-checkouts-existing-chunk.script
+++ b/tests.branching/edit-checkouts-existing-chunk.script
@@ -21,7 +21,7 @@
set -eu
# Checkout the master system branch.
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" checkout alfred
@@ -30,10 +30,10 @@ cd alfred/morphs
"$SRCDIR/scripts/test-morph" edit baserock:hello alfred
echo "Current branches, morphs:"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/mine/alfred/morphs" branch
+"$SRCDIR/scripts/run-git-in" "$DATADIR/workspace/alfred/morphs" branch
echo "Current branches, hello:"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/mine/alfred/hello" branch
+"$SRCDIR/scripts/run-git-in" "$DATADIR/workspace/alfred/hello" branch
echo "Files in hello:"
-ls "$DATADIR/mine/alfred/hello"
+ls "$DATADIR/workspace/alfred/hello"
diff --git a/tests.branching/edit-clones-chunk.script b/tests.branching/edit-clones-chunk.script
index 8b87b4d2..38f2cd75 100755
--- a/tests.branching/edit-clones-chunk.script
+++ b/tests.branching/edit-clones-chunk.script
@@ -21,7 +21,7 @@
set -eu
# Create system branch.
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" branch newbranch
@@ -30,15 +30,17 @@ cd newbranch/morphs
"$SRCDIR/scripts/test-morph" edit baserock:hello master
echo "Current branches, morphs:"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/mine/newbranch/morphs" branch
+"$SRCDIR/scripts/run-git-in" "$DATADIR/workspace/newbranch/morphs" branch
echo "Current origin, morphs:"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/mine/newbranch/morphs" \
- remote show origin | sed 's,\(TMP/mine/\.morph/cache/gits/file_\).*_,\1,g'
+"$SRCDIR/scripts/run-git-in" "$DATADIR/workspace/newbranch/morphs" \
+ remote show origin | \
+ sed 's,\(TMP/workspace/\.morph/cache/gits/file_\).*_,\1,g'
echo "Current branches, hello:"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/mine/newbranch/hello" branch
+"$SRCDIR/scripts/run-git-in" "$DATADIR/workspace/newbranch/hello" branch
echo "Current origin, hello:"
-"$SRCDIR/scripts/run-git-in" "$DATADIR/mine/newbranch/hello" \
- remote show origin | sed 's,\(TMP/mine/\.morph/cache/gits/file_\).*_,\1,g'
+"$SRCDIR/scripts/run-git-in" "$DATADIR/workspace/newbranch/hello" \
+ remote show origin | \
+ sed 's,\(TMP/workspace/\.morph/cache/gits/file_\).*_,\1,g'
diff --git a/tests.branching/edit-updates-stratum.script b/tests.branching/edit-updates-stratum.script
index a3e213e5..4a2f6a10 100755
--- a/tests.branching/edit-updates-stratum.script
+++ b/tests.branching/edit-updates-stratum.script
@@ -21,7 +21,7 @@
set -eu
# Create system branch.
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" branch newbranch
diff --git a/tests.branching/edit-uses-ref-from-stratum.script b/tests.branching/edit-uses-ref-from-stratum.script
index 74c26d5a..8b952b02 100755
--- a/tests.branching/edit-uses-ref-from-stratum.script
+++ b/tests.branching/edit-uses-ref-from-stratum.script
@@ -21,7 +21,7 @@
set -eu
# Create system branch.
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" branch newbranch
diff --git a/tests.branching/init-cwd.script b/tests.branching/init-cwd.script
index 91c23506..61a62b1d 100755
--- a/tests.branching/init-cwd.script
+++ b/tests.branching/init-cwd.script
@@ -19,7 +19,7 @@ set -eu
# Test that "morph init" works for the current working directory.
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init .
-"$SRCDIR/scripts/list-tree" "$DATADIR/mine"
+"$SRCDIR/scripts/list-tree" "$DATADIR/workspace"
diff --git a/tests.branching/init-default.script b/tests.branching/init-default.script
index 5ec5148d..f6abf7d0 100755
--- a/tests.branching/init-default.script
+++ b/tests.branching/init-default.script
@@ -19,6 +19,6 @@ set -eu
# Test that "morph init" works without an explicit argument.
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
-"$SRCDIR/scripts/list-tree" "$DATADIR/mine"
+"$SRCDIR/scripts/list-tree" "$DATADIR/workspace"
diff --git a/tests.branching/init-existing.script b/tests.branching/init-existing.script
index 59b658aa..b4031082 100755
--- a/tests.branching/init-existing.script
+++ b/tests.branching/init-existing.script
@@ -20,5 +20,5 @@ set -eu
# Test that "morph init" works when given the name of an existing,
# empty directory.
-"$SRCDIR/scripts/test-morph" init "$DATADIR/mine"
-"$SRCDIR/scripts/list-tree" "$DATADIR/mine"
+"$SRCDIR/scripts/test-morph" init "$DATADIR/workspace"
+"$SRCDIR/scripts/list-tree" "$DATADIR/workspace"
diff --git a/tests.branching/init-nonempty.script b/tests.branching/init-nonempty.script
index 28762d08..3bcb8e88 100755
--- a/tests.branching/init-nonempty.script
+++ b/tests.branching/init-nonempty.script
@@ -20,5 +20,5 @@ set -eu
# Test that "morph init" fails when given the name of an existing,
# non-empty directory.
-touch "$DATADIR/mine/foo"
-"$SRCDIR/scripts/test-morph" init "$DATADIR/mine"
+touch "$DATADIR/workspace/foo"
+"$SRCDIR/scripts/test-morph" init "$DATADIR/workspace"
diff --git a/tests.branching/init-nonempty.stderr b/tests.branching/init-nonempty.stderr
index 4ed4bba8..bc0ef0e1 100644
--- a/tests.branching/init-nonempty.stderr
+++ b/tests.branching/init-nonempty.stderr
@@ -1 +1 @@
-ERROR: can only initialize empty directory: TMP/mine
+ERROR: can only initialize empty directory as a workspace: TMP/workspace
diff --git a/tests.branching/merge-explicitly-named-repos.script b/tests.branching/merge-explicitly-named-repos.script
index 48705f8a..a8509045 100755
--- a/tests.branching/merge-explicitly-named-repos.script
+++ b/tests.branching/merge-explicitly-named-repos.script
@@ -22,7 +22,7 @@ set -eu
# Create system branch.
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" branch newbranch
@@ -35,7 +35,7 @@ git add newfile.txt
git commit -m foo --quiet
# Merge changes to a new system branch.
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" branch otherbranch
cd otherbranch/morphs
"$SRCDIR/scripts/test-morph" edit baserock:hello master
diff --git a/tests.branching/minedir-not-found.script b/tests.branching/minedir-not-found.script
index eb8c9d51..66e3336e 100755
--- a/tests.branching/minedir-not-found.script
+++ b/tests.branching/minedir-not-found.script
@@ -14,6 +14,6 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-scripts/test-morph init "$DATADIR/mine"
+scripts/test-morph init "$DATADIR/workspace"
cd "$DATADIR"
-"$SRCDIR/scripts/test-morph" minedir
+"$SRCDIR/scripts/test-morph" workspace
diff --git a/tests.branching/minedir-not-found.stderr b/tests.branching/minedir-not-found.stderr
index 46dbd84b..ea9fb165 100644
--- a/tests.branching/minedir-not-found.stderr
+++ b/tests.branching/minedir-not-found.stderr
@@ -1 +1 @@
-ERROR: Can't find the mine directory
+ERROR: Can't find the workspace directory
diff --git a/tests.branching/minedir.script b/tests.branching/minedir.script
index 5f3574b7..88a7b5ef 100755
--- a/tests.branching/minedir.script
+++ b/tests.branching/minedir.script
@@ -14,7 +14,7 @@
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-scripts/test-morph init "$DATADIR/mine"
-mkdir -p "$DATADIR/mine/a/b/c"
-cd "$DATADIR/mine/a/b/c"
-"$SRCDIR/scripts/test-morph" minedir
+scripts/test-morph init "$DATADIR/workspace"
+mkdir -p "$DATADIR/workspace/a/b/c"
+cd "$DATADIR/workspace/a/b/c"
+"$SRCDIR/scripts/test-morph" workspace
diff --git a/tests.branching/minedir.stdout b/tests.branching/minedir.stdout
index 0fc25ee9..14c44f7d 100644
--- a/tests.branching/minedir.stdout
+++ b/tests.branching/minedir.stdout
@@ -1 +1 @@
-TMP/mine
+TMP/workspace
diff --git a/tests.branching/petrify.script b/tests.branching/petrify.script
index 303d7f72..02d5f1d8 100755
--- a/tests.branching/petrify.script
+++ b/tests.branching/petrify.script
@@ -21,7 +21,7 @@
set -eu
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" update-gits baserock:morphs master \
hello-stratum.morph
diff --git a/tests.branching/setup b/tests.branching/setup
index 84d1d545..1705c9b4 100755
--- a/tests.branching/setup
+++ b/tests.branching/setup
@@ -18,7 +18,7 @@
# Set up $DATADIR.
#
# - a morph.conf configuration file
-# - an empty morph mine directory
+# - an empty morph workspace directory
# - a git repository called "morphs" for fake system, stratum morphologies
# - a git repository calle "hello" for a dummy chunk
@@ -41,7 +41,7 @@ GIT_COMMITTER_DATE="1343753514 +0000"
cat <<EOF > "$DATADIR/morph.conf"
[config]
repo-alias = baserock=file://$DATADIR/%s#file://$DATADIR/%s
-cachedir = $DATADIR/mine/.morph/cache
+cachedir = $DATADIR/workspace/.morph/cache
log = $DATADIR/morph.log
keep-path = true
no-distcc = true
@@ -49,8 +49,8 @@ quiet = true
EOF
-# Create an empty directory to be used as a morph mine
-mkdir "$DATADIR/mine"
+# Create an empty directory to be used as a morph workspace
+mkdir "$DATADIR/workspace"
# Create a fake morphs repository
diff --git a/tests.branching/show-system-branch-shows-name-correctly.script b/tests.branching/show-system-branch-shows-name-correctly.script
index 38b2aa14..9bbbc27c 100755
--- a/tests.branching/show-system-branch-shows-name-correctly.script
+++ b/tests.branching/show-system-branch-shows-name-correctly.script
@@ -22,7 +22,7 @@
set -eu
# Create system branch.
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" branch newbranch
diff --git a/tests.branching/workflow.script b/tests.branching/workflow.script
index 6a365d8e..0c4f8578 100755
--- a/tests.branching/workflow.script
+++ b/tests.branching/workflow.script
@@ -21,7 +21,7 @@
set -eu
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" init
"$SRCDIR/scripts/test-morph" branch me/readme-fix
cd me/readme-fix/morphs
@@ -31,7 +31,7 @@ echo > README yoyoyo
git add README
git commit -m "Fix README, yo!" --quiet
-cd "$DATADIR/mine"
+cd "$DATADIR/workspace"
"$SRCDIR/scripts/test-morph" checkout master
cd master/morphs
"$SRCDIR/scripts/test-morph" edit baserock:hello master