From 34c03048cc99e8a8abeb3e3c99574a92a2acb00a Mon Sep 17 00:00:00 2001 From: Jannis Pohlmann Date: Wed, 29 Aug 2012 13:06:27 +0000 Subject: Make "morph checkout" require a repository parameter Instead of hard-coding "baserock:morphs" as the repository we check out from, we want to allow people to check out from arbitrary repositories with system and stratum morphologies. This commit adds a mandatory repository parameter to "morph checkout". This parameter can either be an aliased repo, e.g. baserock:morphs, or a full repo URL such as ssh://gitano@git.baserock.org/baserock/morphs. When cloning the actual repository into a local directory, the following happens: For alias repos baserock:morphs and baserock:foo/bar, the repositories would be cloned into the directories $workspace/$branch/baserock:morphs and $workspace/$branch/baserock:foo/bar. For repos specified using full URLs, the scheme and .git suffix (if present) are stripped off. The above ssh example would be cloned into the following directory: $workspace/$branch/gitano@git.baserock.org/baserock/morphs This commit also adjusts all affected tests and adds a new test to verify that checking out from full repo URLs works as expected. --- tests.branching/checkout-existing-branch.script | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests.branching/checkout-existing-branch.script') diff --git a/tests.branching/checkout-existing-branch.script b/tests.branching/checkout-existing-branch.script index 643a3a5e..e7e3a379 100755 --- a/tests.branching/checkout-existing-branch.script +++ b/tests.branching/checkout-existing-branch.script @@ -15,7 +15,7 @@ # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. -# Verify that "morph checkout master" works. +# Verify that "morph checkout baserock:morphs master" works. set -eu @@ -23,11 +23,11 @@ set -eu cd "$DATADIR/workspace" "$SRCDIR/scripts/test-morph" init -"$SRCDIR/scripts/test-morph" checkout master +"$SRCDIR/scripts/test-morph" checkout baserock:morphs master echo "File tree:" "$SRCDIR/scripts/list-tree" . | grep -v '/\.git/' | sed 's,/cache/gits/file_[^/]*_,/cache/gits/file_,' echo "Current branches:" -"$SRCDIR/scripts/run-git-in" master/morphs branch +"$SRCDIR/scripts/run-git-in" master/baserock:morphs branch -- cgit v1.2.1