diff options
Diffstat (limited to 'tests.branching')
26 files changed, 128 insertions, 289 deletions
diff --git a/tests.branching/add-then-edit.script b/tests.branching/add-then-edit.script index 5cd6e842..2dd62254 100755 --- a/tests.branching/add-then-edit.script +++ b/tests.branching/add-then-edit.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2013 Codethink Limited +# Copyright (C) 2013-2014 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 @@ -27,7 +27,7 @@ cd "$DATADIR/workspace" cd "me/add-then-edit" # add a chunk -cd test:morphs +cd test/morphs ## Sub-optimally, to alter the stratum, you have to `morph edit` it first "$SRCDIR/scripts/test-morph" edit hello-system hello-stratum @@ -51,4 +51,4 @@ with open("hello-stratum.morph", "w") as f: grep -qFe goodbye hello-stratum.morph # check whether edit has cloned the repository to the right branch -git --git-dir="../test:goodbye/.git" rev-parse --abbrev-ref HEAD +git --git-dir="../goodbye/.git" rev-parse --abbrev-ref HEAD diff --git a/tests.branching/ambiguous-refs.script b/tests.branching/ambiguous-refs.script index ed72f9e3..aeec61a1 100755 --- a/tests.branching/ambiguous-refs.script +++ b/tests.branching/ambiguous-refs.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 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 @@ -37,10 +37,10 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" branch test:morphs release # Create an extra ref to confuse any users of git show-ref -cd release/test:morphs +cd release/test/morphs git checkout --quiet -b alpha/master HEAD~1 git checkout --quiet release # The petrify will fail if we resolved 'master' as 'alpha/master' by mistake. -cd "$DATADIR/workspace/release/test:morphs" +cd "$DATADIR/workspace/release/test/morphs" "$SRCDIR/scripts/test-morph" petrify 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 72e21740..c561f191 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,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2012,2014 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 @@ -31,8 +31,8 @@ echo "File tree:" grep -v 'cache/gits/file_[^/]*/' echo "Current branches:" -"$SRCDIR/scripts/run-git-in" newbranch/test:morphs branch +"$SRCDIR/scripts/run-git-in" newbranch/test/morphs branch echo "Current origin:" -"$SRCDIR/scripts/run-git-in" newbranch/test:morphs remote show origin | +"$SRCDIR/scripts/run-git-in" newbranch/test/morphs remote show origin | sed 's,\(TMP/workspace/\.morph/cache/gits/file_\).*_,\1,g' diff --git a/tests.branching/branch-creates-new-system-branch-not-from-master.stdout b/tests.branching/branch-creates-new-system-branch-not-from-master.stdout index af65eb7b..c61624b4 100644 --- a/tests.branching/branch-creates-new-system-branch-not-from-master.stdout +++ b/tests.branching/branch-creates-new-system-branch-not-from-master.stdout @@ -3,12 +3,13 @@ d . d ./.morph d ./newbranch d ./newbranch/.morph-system-branch -d ./newbranch/test:morphs -d ./newbranch/test:morphs/.git +d ./newbranch/test +d ./newbranch/test/morphs +d ./newbranch/test/morphs/.git f ./newbranch/.morph-system-branch/config -f ./newbranch/test:morphs/hello-stratum.morph -f ./newbranch/test:morphs/hello-system.morph -f ./newbranch/test:morphs/this.is.alfred +f ./newbranch/test/morphs/hello-stratum.morph +f ./newbranch/test/morphs/hello-system.morph +f ./newbranch/test/morphs/this.is.alfred Current branches: alfred * newbranch diff --git a/tests.branching/branch-creates-new-system-branch.script b/tests.branching/branch-creates-new-system-branch.script index c2d7f640..784bed62 100755 --- a/tests.branching/branch-creates-new-system-branch.script +++ b/tests.branching/branch-creates-new-system-branch.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2012,2014 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 @@ -31,8 +31,8 @@ echo "File tree:" grep -v 'cache/gits/file_[^/]*/' echo "Current branches:" -"$SRCDIR/scripts/run-git-in" newbranch/test:morphs branch +"$SRCDIR/scripts/run-git-in" newbranch/test/morphs branch echo "Current origin:" -"$SRCDIR/scripts/run-git-in" newbranch/test:morphs remote show origin | +"$SRCDIR/scripts/run-git-in" newbranch/test/morphs remote show origin | sed 's,\(TMP/workspace/\.morph/cache/gits/file_\).*_,\1,g' diff --git a/tests.branching/branch-creates-new-system-branch.stdout b/tests.branching/branch-creates-new-system-branch.stdout index ba1651e5..a7318378 100644 --- a/tests.branching/branch-creates-new-system-branch.stdout +++ b/tests.branching/branch-creates-new-system-branch.stdout @@ -3,11 +3,12 @@ d . d ./.morph d ./newbranch d ./newbranch/.morph-system-branch -d ./newbranch/test:morphs -d ./newbranch/test:morphs/.git +d ./newbranch/test +d ./newbranch/test/morphs +d ./newbranch/test/morphs/.git f ./newbranch/.morph-system-branch/config -f ./newbranch/test:morphs/hello-stratum.morph -f ./newbranch/test:morphs/hello-system.morph +f ./newbranch/test/morphs/hello-stratum.morph +f ./newbranch/test/morphs/hello-system.morph Current branches: master * newbranch diff --git a/tests.branching/branch-works-anywhere.script b/tests.branching/branch-works-anywhere.script index ee8f5bfa..7f6156ce 100755 --- a/tests.branching/branch-works-anywhere.script +++ b/tests.branching/branch-works-anywhere.script @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2012,2014 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 @@ -53,7 +53,7 @@ echo "Workspace after creating the third branch:" # Now, go into the morphs repository of that third branch and # create a fourth system branch from in there. This, too, should # end up being created in the toplevel workspace directory. -cd "$DATADIR/workspace/branch3/test:morphs" +cd "$DATADIR/workspace/branch3/test/morphs" "$SRCDIR/scripts/test-morph" branch test:morphs branch4 echo "Workspace after creating the fourth branch:" diff --git a/tests.branching/branch-works-anywhere.stdout b/tests.branching/branch-works-anywhere.stdout index 0b59ce71..4e317902 100644 --- a/tests.branching/branch-works-anywhere.stdout +++ b/tests.branching/branch-works-anywhere.stdout @@ -3,80 +3,90 @@ d . d ./.morph d ./branch1 d ./branch1/.morph-system-branch -d ./branch1/test:morphs -d ./branch1/test:morphs/.git +d ./branch1/test +d ./branch1/test/morphs +d ./branch1/test/morphs/.git f ./branch1/.morph-system-branch/config -f ./branch1/test:morphs/hello-stratum.morph -f ./branch1/test:morphs/hello-system.morph +f ./branch1/test/morphs/hello-stratum.morph +f ./branch1/test/morphs/hello-system.morph Workspace after creating the second branch: d . d ./.morph d ./branch1 d ./branch1/.morph-system-branch -d ./branch1/test:morphs -d ./branch1/test:morphs/.git +d ./branch1/test +d ./branch1/test/morphs +d ./branch1/test/morphs/.git d ./branch2 d ./branch2/.morph-system-branch -d ./branch2/test:morphs -d ./branch2/test:morphs/.git +d ./branch2/test +d ./branch2/test/morphs +d ./branch2/test/morphs/.git f ./branch1/.morph-system-branch/config -f ./branch1/test:morphs/hello-stratum.morph -f ./branch1/test:morphs/hello-system.morph +f ./branch1/test/morphs/hello-stratum.morph +f ./branch1/test/morphs/hello-system.morph f ./branch2/.morph-system-branch/config -f ./branch2/test:morphs/hello-stratum.morph -f ./branch2/test:morphs/hello-system.morph +f ./branch2/test/morphs/hello-stratum.morph +f ./branch2/test/morphs/hello-system.morph Workspace after creating the third branch: d . d ./.morph d ./branch1 d ./branch1/.morph-system-branch -d ./branch1/test:morphs -d ./branch1/test:morphs/.git +d ./branch1/test +d ./branch1/test/morphs +d ./branch1/test/morphs/.git d ./branch2 d ./branch2/.morph-system-branch -d ./branch2/test:morphs -d ./branch2/test:morphs/.git +d ./branch2/test +d ./branch2/test/morphs +d ./branch2/test/morphs/.git d ./branch3 d ./branch3/.morph-system-branch -d ./branch3/test:morphs -d ./branch3/test:morphs/.git +d ./branch3/test +d ./branch3/test/morphs +d ./branch3/test/morphs/.git f ./branch1/.morph-system-branch/config -f ./branch1/test:morphs/hello-stratum.morph -f ./branch1/test:morphs/hello-system.morph +f ./branch1/test/morphs/hello-stratum.morph +f ./branch1/test/morphs/hello-system.morph f ./branch2/.morph-system-branch/config -f ./branch2/test:morphs/hello-stratum.morph -f ./branch2/test:morphs/hello-system.morph +f ./branch2/test/morphs/hello-stratum.morph +f ./branch2/test/morphs/hello-system.morph f ./branch3/.morph-system-branch/config -f ./branch3/test:morphs/hello-stratum.morph -f ./branch3/test:morphs/hello-system.morph +f ./branch3/test/morphs/hello-stratum.morph +f ./branch3/test/morphs/hello-system.morph Workspace after creating the fourth branch: d . d ./.morph d ./branch1 d ./branch1/.morph-system-branch -d ./branch1/test:morphs -d ./branch1/test:morphs/.git +d ./branch1/test +d ./branch1/test/morphs +d ./branch1/test/morphs/.git d ./branch2 d ./branch2/.morph-system-branch -d ./branch2/test:morphs -d ./branch2/test:morphs/.git +d ./branch2/test +d ./branch2/test/morphs +d ./branch2/test/morphs/.git d ./branch3 d ./branch3/.morph-system-branch -d ./branch3/test:morphs -d ./branch3/test:morphs/.git +d ./branch3/test +d ./branch3/test/morphs +d ./branch3/test/morphs/.git d ./branch4 d ./branch4/.morph-system-branch -d ./branch4/test:morphs -d ./branch4/test:morphs/.git +d ./branch4/test +d ./branch4/test/morphs +d ./branch4/test/morphs/.git f ./branch1/.morph-system-branch/config -f ./branch1/test:morphs/hello-stratum.morph -f ./branch1/test:morphs/hello-system.morph +f ./branch1/test/morphs/hello-stratum.morph +f ./branch1/test/morphs/hello-system.morph f ./branch2/.morph-system-branch/config -f ./branch2/test:morphs/hello-stratum.morph -f ./branch2/test:morphs/hello-system.morph +f ./branch2/test/morphs/hello-stratum.morph +f ./branch2/test/morphs/hello-system.morph f ./branch3/.morph-system-branch/config -f ./branch3/test:morphs/hello-stratum.morph -f ./branch3/test:morphs/hello-system.morph +f ./branch3/test/morphs/hello-stratum.morph +f ./branch3/test/morphs/hello-system.morph f ./branch4/.morph-system-branch/config -f ./branch4/test:morphs/hello-stratum.morph -f ./branch4/test:morphs/hello-system.morph +f ./branch4/test/morphs/hello-stratum.morph +f ./branch4/test/morphs/hello-system.morph diff --git a/tests.branching/checkout-existing-branch.script b/tests.branching/checkout-existing-branch.script index 653fffb5..b1740d9c 100755 --- a/tests.branching/checkout-existing-branch.script +++ b/tests.branching/checkout-existing-branch.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2012,2014 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 @@ -30,4 +30,4 @@ echo "File tree:" grep -v 'cache/gits/file_[^/]*/' echo "Current branches:" -"$SRCDIR/scripts/run-git-in" master/test:morphs branch +"$SRCDIR/scripts/run-git-in" master/test/morphs branch diff --git a/tests.branching/checkout-existing-branch.stdout b/tests.branching/checkout-existing-branch.stdout index 0f51893a..a6026269 100644 --- a/tests.branching/checkout-existing-branch.stdout +++ b/tests.branching/checkout-existing-branch.stdout @@ -3,10 +3,11 @@ d . d ./.morph d ./master d ./master/.morph-system-branch -d ./master/test:morphs -d ./master/test:morphs/.git +d ./master/test +d ./master/test/morphs +d ./master/test/morphs/.git f ./master/.morph-system-branch/config -f ./master/test:morphs/hello-stratum.morph -f ./master/test:morphs/hello-system.morph +f ./master/test/morphs/hello-stratum.morph +f ./master/test/morphs/hello-system.morph Current branches: * master diff --git a/tests.branching/checkout-works-anywhere.script b/tests.branching/checkout-works-anywhere.script index 02deb4d7..14d18842 100755 --- a/tests.branching/checkout-works-anywhere.script +++ b/tests.branching/checkout-works-anywhere.script @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2012,2014 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 @@ -41,7 +41,7 @@ cd workspace # This time, create a new branch and check out the master branch # from within that branch. "$SRCDIR/scripts/test-morph" branch test:morphs newbranch -cd newbranch/test:morphs +cd newbranch/test/morphs "$SRCDIR/scripts/test-morph" checkout test:morphs master echo "Workspace after checking out master from within a new branch:" diff --git a/tests.branching/checkout-works-anywhere.stdout b/tests.branching/checkout-works-anywhere.stdout index ba83058f..ed8b1567 100644 --- a/tests.branching/checkout-works-anywhere.stdout +++ b/tests.branching/checkout-works-anywhere.stdout @@ -3,25 +3,28 @@ d . d ./.morph d ./master d ./master/.morph-system-branch -d ./master/test:morphs -d ./master/test:morphs/.git +d ./master/test +d ./master/test/morphs +d ./master/test/morphs/.git f ./master/.morph-system-branch/config -f ./master/test:morphs/hello-stratum.morph -f ./master/test:morphs/hello-system.morph +f ./master/test/morphs/hello-stratum.morph +f ./master/test/morphs/hello-system.morph Workspace after checking out master from within a new branch: d . d ./.morph d ./master d ./master/.morph-system-branch -d ./master/test:morphs -d ./master/test:morphs/.git +d ./master/test +d ./master/test/morphs +d ./master/test/morphs/.git d ./newbranch d ./newbranch/.morph-system-branch -d ./newbranch/test:morphs -d ./newbranch/test:morphs/.git +d ./newbranch/test +d ./newbranch/test/morphs +d ./newbranch/test/morphs/.git f ./master/.morph-system-branch/config -f ./master/test:morphs/hello-stratum.morph -f ./master/test:morphs/hello-system.morph +f ./master/test/morphs/hello-stratum.morph +f ./master/test/morphs/hello-system.morph f ./newbranch/.morph-system-branch/config -f ./newbranch/test:morphs/hello-stratum.morph -f ./newbranch/test:morphs/hello-system.morph +f ./newbranch/test/morphs/hello-stratum.morph +f ./newbranch/test/morphs/hello-system.morph diff --git a/tests.branching/edit-checkouts-existing-chunk.script b/tests.branching/edit-checkouts-existing-chunk.script index 9e66ceb0..c8fb9312 100755 --- a/tests.branching/edit-checkouts-existing-chunk.script +++ b/tests.branching/edit-checkouts-existing-chunk.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 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 @@ -34,4 +34,4 @@ echo "Current branches:" echo echo "Files in hello:" -ls "$DATADIR/workspace/alfred/test:hello" +ls "$DATADIR/workspace/alfred/test/hello" diff --git a/tests.branching/edit-handles-submodules.script b/tests.branching/edit-handles-submodules.script index 72344119..2ab39420 100755 --- a/tests.branching/edit-handles-submodules.script +++ b/tests.branching/edit-handles-submodules.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 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 @@ -28,6 +28,6 @@ cd "$DATADIR/workspace" # Submodules should be set up automatically "$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello -cd "$DATADIR/workspace/newbranch/test:hello" +cd "$DATADIR/workspace/newbranch/test/hello" [ -e foolib/README ] diff --git a/tests.branching/edit-updates-stratum.script b/tests.branching/edit-updates-stratum.script index bfe16c8b..cf5fc26d 100755 --- a/tests.branching/edit-updates-stratum.script +++ b/tests.branching/edit-updates-stratum.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 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 @@ -29,4 +29,4 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello # See what effect the editing had. -"$SRCDIR/scripts/run-git-in" "newbranch/test:morphs" diff +"$SRCDIR/scripts/run-git-in" "newbranch/test/morphs" diff diff --git a/tests.branching/morph-repository-stored-in-cloned-repositories.script b/tests.branching/morph-repository-stored-in-cloned-repositories.script index c2dc8690..342c3d0b 100755 --- a/tests.branching/morph-repository-stored-in-cloned-repositories.script +++ b/tests.branching/morph-repository-stored-in-cloned-repositories.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2012,2014 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 @@ -29,7 +29,7 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" branch test:morphs newbranch echo "morph.repository in branch root repository:" -cd "$DATADIR/workspace/newbranch/test:morphs" +cd "$DATADIR/workspace/newbranch/test/morphs" git config morph.repository echo @@ -37,7 +37,7 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" checkout test:morphs master echo "morph.repository in branch root repository of a checkout:" -cd "$DATADIR/workspace/master/test:morphs" +cd "$DATADIR/workspace/master/test/morphs" git config morph.repository echo @@ -45,5 +45,5 @@ cd "$DATADIR/workspace/master" "$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello echo "morph.repository of an edited repository:" -cd "$DATADIR/workspace/master/test:hello" +cd "$DATADIR/workspace/master/test/hello" git config morph.repository diff --git a/tests.branching/petrify-no-double-petrify.script b/tests.branching/petrify-no-double-petrify.script index 9484aa58..3c9185dc 100755 --- a/tests.branching/petrify-no-double-petrify.script +++ b/tests.branching/petrify-no-double-petrify.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 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 @@ -25,7 +25,7 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init "$SRCDIR/scripts/test-morph" branch test:morphs test/petrify -cd test/petrify/test:morphs +cd test/petrify/test/morphs git push --quiet origin HEAD "$SRCDIR/scripts/test-morph" petrify "$SRCDIR/scripts/test-morph" petrify diff --git a/tests.branching/petrify.script b/tests.branching/petrify.script index fed8e965..5a3cb8c4 100755 --- a/tests.branching/petrify.script +++ b/tests.branching/petrify.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 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 @@ -27,10 +27,10 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init "$SRCDIR/scripts/test-morph" branch test:morphs test/petrify master -cd test/petrify/test:morphs +cd test/petrify/test/morphs git push --quiet origin HEAD "$SRCDIR/scripts/test-morph" edit hello-system hello-stratum goodbye -(cd ../test:goodbye && git push --quiet origin HEAD) +(cd ../goodbye && git push --quiet origin HEAD) "$SRCDIR/scripts/test-morph" petrify echo "Petrified:" diff --git a/tests.branching/setup b/tests.branching/setup index 06a05e90..22c51c24 100755 --- a/tests.branching/setup +++ b/tests.branching/setup @@ -50,7 +50,7 @@ ln -s "$DATADIR/morphs" "$DATADIR/morphs.git" cat <<EOF > "$DATADIR/morphs/hello-system.morph" name: hello-system kind: system -arch: $(uname -m) +arch: $("$SRCDIR/scripts/test-morph" print-architecture) strata: - morph: hello-stratum EOF diff --git a/tests.branching/status-in-dirty-branch.script b/tests.branching/status-in-dirty-branch.script index cc1dd46e..7fdd8862 100755 --- a/tests.branching/status-in-dirty-branch.script +++ b/tests.branching/status-in-dirty-branch.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2011-2013 Codethink Limited +# Copyright (C) 2011-2014 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 @@ -37,7 +37,7 @@ cd "$DATADIR/workspace" cd branch1 "$SRCDIR/scripts/test-morph" edit hello-system stratum2 hello -cd test:stratum2-hello +cd test/stratum2-hello git checkout -q master cd .. diff --git a/tests.branching/tag-creates-commit-and-tag.script b/tests.branching/tag-creates-commit-and-tag.script deleted file mode 100755 index 8fd45d16..00000000 --- a/tests.branching/tag-creates-commit-and-tag.script +++ /dev/null @@ -1,39 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2012-2013 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. - - -## Check that 'morph tag example-tag' successfully creates a dangling -## commit and an annotated tag pointing to this commit. - -set -eu - -# Make sure the commits always have the same SHA1s. -. "$SRCDIR/scripts/fix-committer-info" - -# Create a workspace and branch. -cd "$DATADIR/workspace" -"$SRCDIR/scripts/test-morph" init -"$SRCDIR/scripts/test-morph" checkout test:morphs master - -# Tag the system branch. -"$SRCDIR/scripts/test-morph" tag example-tag -- -m Message - -# Show the tag itself and its log. This allows to verify a couple of things, -# including that the commit and tag are created, that the commit message is -# set correctly and that all references are petrified. -"$SRCDIR/scripts/test-morph" foreach -- git show example-tag -"$SRCDIR/scripts/test-morph" foreach -- git log --format=fuller example-tag diff --git a/tests.branching/tag-creates-commit-and-tag.stdout b/tests.branching/tag-creates-commit-and-tag.stdout deleted file mode 100644 index 335e6a31..00000000 --- a/tests.branching/tag-creates-commit-and-tag.stdout +++ /dev/null @@ -1,44 +0,0 @@ -test:morphs -tag example-tag -Tagger: developer <developer@example.com> -Date: Tue Jul 31 16:51:54 2012 +0000 - -Message - -commit 74b7fcdd21ac4756e473eb8a577caaabeab208b0 -Author: developer <developer@example.com> -Date: Tue Jul 31 16:51:54 2012 +0000 - - Message - -diff --git a/hello-stratum.morph b/hello-stratum.morph -index e012b5f..50da61b 100644 ---- a/hello-stratum.morph -+++ b/hello-stratum.morph -@@ -3,6 +3,7 @@ kind: stratum - chunks: - - name: hello - repo: test:hello -- ref: master -+ ref: 293fa0b08f0382c63181c36b6efa602876aa8c87 -+ unpetrify-ref: master - build-depends: [] - build-mode: test - -test:morphs -commit 74b7fcdd21ac4756e473eb8a577caaabeab208b0 -Author: developer <developer@example.com> -AuthorDate: Tue Jul 31 16:51:54 2012 +0000 -Commit: developer <developer@example.com> -CommitDate: Tue Jul 31 16:51:54 2012 +0000 - - Message - -commit dc323150575be26e3df0d2dab678560c04281b9f -Author: developer <developer@example.com> -AuthorDate: Tue Jul 31 16:51:54 2012 +0000 -Commit: developer <developer@example.com> -CommitDate: Tue Jul 31 16:51:54 2012 +0000 - - initial - diff --git a/tests.branching/tag-tag-works-as-expected.script b/tests.branching/tag-tag-works-as-expected.script deleted file mode 100755 index 006b98bf..00000000 --- a/tests.branching/tag-tag-works-as-expected.script +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2012-2013 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. - - -## Check that tagging an existing tag commit with 'morph tag' preserves -## the unpetrify-ref and does not "double-petrify" apart from updating -## references to "example-tag" to "tagged-tag". - -set -eu - -# Make sure the commits always have the same SHA1s. -. "$SRCDIR/scripts/fix-committer-info" - -# Create a workspace and branch. -cd "$DATADIR/workspace" -"$SRCDIR/scripts/test-morph" init -"$SRCDIR/scripts/test-morph" checkout test:morphs master - -# Tag the system branch. -"$SRCDIR/scripts/test-morph" tag example-tag -- -m First - -# Check out the tag. -"$SRCDIR/scripts/run-git-in" master/test:morphs checkout -b example-tag \ - 2>/dev/null - -# Tag the tag. -"$SRCDIR/scripts/test-morph" tag tagged-tag -- -m Second - -# List all tags and show the second one. -"$SRCDIR/scripts/test-morph" foreach -- git tag -l -"$SRCDIR/scripts/test-morph" foreach -- git show tagged-tag -"$SRCDIR/scripts/test-morph" foreach -- git log --format=fuller tagged-tag diff --git a/tests.branching/tag-tag-works-as-expected.stdout b/tests.branching/tag-tag-works-as-expected.stdout deleted file mode 100644 index c3d723d7..00000000 --- a/tests.branching/tag-tag-works-as-expected.stdout +++ /dev/null @@ -1,48 +0,0 @@ -test:morphs -example-tag -tagged-tag - -test:morphs -tag tagged-tag -Tagger: developer <developer@example.com> -Date: Tue Jul 31 16:51:54 2012 +0000 - -Second - -commit ed4fa3a98076e92d61983202ed44455b3689bc16 -Author: developer <developer@example.com> -Date: Tue Jul 31 16:51:54 2012 +0000 - - Second - -diff --git a/hello-stratum.morph b/hello-stratum.morph -index e012b5f..50da61b 100644 ---- a/hello-stratum.morph -+++ b/hello-stratum.morph -@@ -3,6 +3,7 @@ kind: stratum - chunks: - - name: hello - repo: test:hello -- ref: master -+ ref: 293fa0b08f0382c63181c36b6efa602876aa8c87 -+ unpetrify-ref: master - build-depends: [] - build-mode: test - -test:morphs -commit ed4fa3a98076e92d61983202ed44455b3689bc16 -Author: developer <developer@example.com> -AuthorDate: Tue Jul 31 16:51:54 2012 +0000 -Commit: developer <developer@example.com> -CommitDate: Tue Jul 31 16:51:54 2012 +0000 - - Second - -commit dc323150575be26e3df0d2dab678560c04281b9f -Author: developer <developer@example.com> -AuthorDate: Tue Jul 31 16:51:54 2012 +0000 -Commit: developer <developer@example.com> -CommitDate: Tue Jul 31 16:51:54 2012 +0000 - - initial - diff --git a/tests.branching/workflow-separate-stratum-repos.script b/tests.branching/workflow-separate-stratum-repos.script index 3faf23f5..f2fd519b 100755 --- a/tests.branching/workflow-separate-stratum-repos.script +++ b/tests.branching/workflow-separate-stratum-repos.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012-2013 Codethink Limited +# Copyright (C) 2012-2014 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 @@ -35,23 +35,23 @@ cd "$DATADIR/workspace" # Edit one chunk cd "me/readme-fixes" "$SRCDIR/scripts/test-morph" edit hello-system stratum2 hello -cd "$DATADIR/workspace/me/readme-fixes/test:stratum2-hello" +cd "$DATADIR/workspace/me/readme-fixes/test/stratum2-hello" echo > README yoyoyo git add README git commit -m "Fix README in hello" --quiet # Edit the other chunk too "$SRCDIR/scripts/test-morph" edit hello-system stratum3 hello -cd "$DATADIR/workspace/me/readme-fixes/test:stratum3-hello" +cd "$DATADIR/workspace/me/readme-fixes/test/stratum3-hello" echo > README yoyoyo git add README git commit -m "Fix README in hello" --quiet # Update the morphology repos -cd ../test:external-strata +cd ../test/external-strata git commit --quiet --all -m "Commit changes for system branch" -cd ../test:morphs +cd ../test/morphs git commit --quiet --all -m "Commit changes for system branch" # Merge our system branch into master @@ -60,13 +60,13 @@ cd master "$SRCDIR/scripts/test-morph" merge me/readme-fixes # Check the changes have appeared -cd test:morphs +cd test/morphs [ $(git rev-parse HEAD) = $(git rev-parse master) ] -cd ../test:stratum2-hello +cd ../test/stratum2-hello [ -e README ] [ $(git rev-parse HEAD) = $(git rev-parse master) ] -cd ../test:stratum3-hello +cd ../test/stratum3-hello [ -e README ] [ $(git rev-parse HEAD) = $(git rev-parse master) ] diff --git a/tests.branching/workflow.script b/tests.branching/workflow.script index 10383132..51a8d106 100755 --- a/tests.branching/workflow.script +++ b/tests.branching/workflow.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2012 Codethink Limited +# Copyright (C) 2012,2014 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 @@ -24,12 +24,12 @@ cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init "$SRCDIR/scripts/test-morph" branch test:morphs me/readme-fix "$SRCDIR/scripts/test-morph" edit hello-system hello-stratum hello -cd me/readme-fix/test:hello +cd me/readme-fix/test/hello echo > README yoyoyo git add README git commit -m "Fix README, yo!" --quiet -cd ../test:morphs +cd ../morphs git commit --quiet --all -m "Commit changes for system branch" cd "$DATADIR/workspace" |