diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-10-12 17:49:27 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-10-12 17:49:27 +0100 |
commit | cf7ed1cb79d4862c92261ac57a27b082a8f10f84 (patch) | |
tree | e3f28dc551cd164e00ec76d46a209b93e474778b /tests.branching | |
parent | 5a430fdf91be1c569d1f1b8d8e3de929a20c2e1b (diff) | |
parent | 4249b7ed46d383b48aa1fbcdb1fa6459022fb4db (diff) | |
download | morph-cf7ed1cb79d4862c92261ac57a27b082a8f10f84.tar.gz |
Merge branch 'samthursfield/morph-status'
Diffstat (limited to 'tests.branching')
-rwxr-xr-x | tests.branching/status-in-clean-branch.script | 26 | ||||
-rw-r--r-- | tests.branching/status-in-clean-branch.stdout | 3 | ||||
-rwxr-xr-x | tests.branching/status-in-dirty-branch.script | 39 | ||||
-rw-r--r-- | tests.branching/status-in-dirty-branch.stdout | 5 | ||||
-rwxr-xr-x | tests.branching/status-in-workspace.script | 29 | ||||
-rw-r--r-- | tests.branching/status-in-workspace.stdout | 4 |
6 files changed, 106 insertions, 0 deletions
diff --git a/tests.branching/status-in-clean-branch.script b/tests.branching/status-in-clean-branch.script new file mode 100755 index 00000000..c102d287 --- /dev/null +++ b/tests.branching/status-in-clean-branch.script @@ -0,0 +1,26 @@ +#!/bin/sh +# Copyright (C) 2011, 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. + + +# 'morph status' within a branch + +set -eu + +cd "$DATADIR/workspace" +"$SRCDIR/scripts/test-morph" init . +"$SRCDIR/scripts/test-morph" branch baserock:morphs test + +"$SRCDIR/scripts/test-morph" status diff --git a/tests.branching/status-in-clean-branch.stdout b/tests.branching/status-in-clean-branch.stdout new file mode 100644 index 00000000..d8468519 --- /dev/null +++ b/tests.branching/status-in-clean-branch.stdout @@ -0,0 +1,3 @@ +On branch test, root baserock:morphs + +No repos have outstanding changes. diff --git a/tests.branching/status-in-dirty-branch.script b/tests.branching/status-in-dirty-branch.script new file mode 100755 index 00000000..36ed781d --- /dev/null +++ b/tests.branching/status-in-dirty-branch.script @@ -0,0 +1,39 @@ +#!/bin/sh +# Copyright (C) 2011, 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. + + +# 'morph status' within a branch + +set -eu + +. "$SRCDIR/tests.branching/setup-3rd-party-strata" + +cd "$DATADIR/workspace" +"$SRCDIR/scripts/test-morph" branch baserock:morphs test + +# Make the branch have some interesting changes and pitfalls +cd test +"$SRCDIR/scripts/test-morph" edit hello-system stratum2 hello + +cd baserock:stratum2-hello +git checkout -q master + +cd .. +mkdir red-herring +cd red-herring +git init -q . + +"$SRCDIR/scripts/test-morph" status diff --git a/tests.branching/status-in-dirty-branch.stdout b/tests.branching/status-in-dirty-branch.stdout new file mode 100644 index 00000000..a81aa765 --- /dev/null +++ b/tests.branching/status-in-dirty-branch.stdout @@ -0,0 +1,5 @@ +On branch test, root baserock:morphs + baserock:morphs: uncommitted changes + baserock:external-strata: uncommitted changes + baserock:stratum2-hello: unexpected ref checked out "master" + TMP/workspace/test/red-herring: not part of system branch diff --git a/tests.branching/status-in-workspace.script b/tests.branching/status-in-workspace.script new file mode 100755 index 00000000..5e13b433 --- /dev/null +++ b/tests.branching/status-in-workspace.script @@ -0,0 +1,29 @@ +#!/bin/sh +# Copyright (C) 2011, 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. + + +# 'morph status' within a workspace + +set -eu + +cd "$DATADIR/workspace" +"$SRCDIR/scripts/test-morph" init . +"$SRCDIR/scripts/test-morph" checkout baserock:morphs master +"$SRCDIR/scripts/test-morph" branch baserock:morphs a/b/c/d/e/foo +"$SRCDIR/scripts/test-morph" branch baserock:morphs a/b/c/d/e/bar +mkdir a/b/c/red-herring + +"$SRCDIR/scripts/test-morph" status diff --git a/tests.branching/status-in-workspace.stdout b/tests.branching/status-in-workspace.stdout new file mode 100644 index 00000000..8d34a8a6 --- /dev/null +++ b/tests.branching/status-in-workspace.stdout @@ -0,0 +1,4 @@ +System branches in current workspace: + master + a/b/c/d/e/bar + a/b/c/d/e/foo |