From 2e5d8664920453ede30b450c7b39ac3a0bc141bb Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Sun, 10 Aug 2014 20:29:42 +0100 Subject: Make morph show-branch-root print the path The help for the show-branch-root command said it returns a path, but the command and the yarns just showed the aliased url it was cloned from. Given I found myself needing the path in some scripts, not the repo url, I think it's more useful to reconcile the difference this way. --- yarns/branches-workspaces.yarn | 10 +++++----- yarns/implementations.yarn | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'yarns') diff --git a/yarns/branches-workspaces.yarn b/yarns/branches-workspaces.yarn index 2f617ce4..25ea7365 100644 --- a/yarns/branches-workspaces.yarn +++ b/yarns/branches-workspaces.yarn @@ -142,19 +142,19 @@ current directory, things should fail. AND the user attempts to report the system branch from the directory . THEN morph failed -`morph show-branch-root` reports the URL (possibly aliases) of the -system branch root repository. It can be run inside a checkout, or -somewhere outside a checkout, where exactly one checkout exists below. +`morph show-branch-root` reports the path of the system branch root +repository. It can be run inside a checkout, or somewhere outside a +checkout, where exactly one checkout exists below. SCENARIO morph reports system branch root repository GIVEN a workspace AND a git server WHEN the user checks out the system branch called master AND the user reports the system branch root repository from the directory master - THEN the system branch root repository is reported as test:morphs + THEN the system branch root repository is reported as workspace/master/test/morphs WHEN the user reports the system branch root repository from the directory . - THEN the system branch root repository is reported as test:morphs + THEN the system branch root repository is reported as workspace/master/test/morphs However, it fails if run outside a checkout and there's no system branches checked out. diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn index 66dd9d57..d2e72ccf 100644 --- a/yarns/implementations.yarn +++ b/yarns/implementations.yarn @@ -419,7 +419,7 @@ Report system branch root repository. else attempt_morph show-branch-root > "$@"; fi IMPLEMENTS THEN the system branch root repository is reported as (.*) - echo "$MATCH_1" > "$DATADIR/branch-root.actual" + echo "$DATADIR/$MATCH_1" > "$DATADIR/branch-root.actual" diff -u "$DATADIR/branch-root.actual" "$DATADIR/branch-root.reported" Editing morphologies with `morph edit`. -- cgit v1.2.1