summaryrefslogtreecommitdiff
path: root/tests.branching/edit-checkouts-existing-chunk.script
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-23 17:20:51 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-23 17:20:51 +0000
commit80a9d3ee14688feada4bd799d02892ba66aa80fa (patch)
tree777b749729a5c6ca61768f642362dbb14782afb8 /tests.branching/edit-checkouts-existing-chunk.script
parenta117a2149cbfbe9df99b92df37e9a9c307256369 (diff)
downloadmorph-80a9d3ee14688feada4bd799d02892ba66aa80fa.tar.gz
Make "morph edit" work when chunk already has the branch
Diffstat (limited to 'tests.branching/edit-checkouts-existing-chunk.script')
-rwxr-xr-xtests.branching/edit-checkouts-existing-chunk.script37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests.branching/edit-checkouts-existing-chunk.script b/tests.branching/edit-checkouts-existing-chunk.script
new file mode 100755
index 00000000..cc5977ca
--- /dev/null
+++ b/tests.branching/edit-checkouts-existing-chunk.script
@@ -0,0 +1,37 @@
+#!/bin/sh
+# Copyright (C) 2012 Codethink Limited
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# 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 edit" clones a chunk repository into a system branch.
+
+
+set -eu
+
+# Checkout the master system branch.
+cd "$DATADIR/mine"
+"$SRCDIR/scripts/test-morph" init
+"$SRCDIR/scripts/test-morph" checkout master
+
+# Edit the hello chunk in master.
+cd master/morphs
+"$SRCDIR/scripts/test-morph" edit hello master
+
+echo "Current branches, morphs:"
+"$SRCDIR/scripts/run-git-in" "$DATADIR/mine/master/morphs" branch
+
+echo "Current branches, hello:"
+"$SRCDIR/scripts/run-git-in" "$DATADIR/mine/master/hello" branch
+