summaryrefslogtreecommitdiff
path: root/morphlib/plugins/branch_and_merge_plugin.py
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@gmail.com>2014-08-10 20:29:42 +0100
committerRichard Maw <richard.maw@codethink.co.uk>2014-08-12 18:07:41 +0100
commit2e5d8664920453ede30b450c7b39ac3a0bc141bb (patch)
treee0954f648bba232b654d86bfc96e8d644c88c237 /morphlib/plugins/branch_and_merge_plugin.py
parent4d794d475e01363928916f7667a63eed6071f5e2 (diff)
downloadmorph-2e5d8664920453ede30b450c7b39ac3a0bc141bb.tar.gz
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.
Diffstat (limited to 'morphlib/plugins/branch_and_merge_plugin.py')
-rw-r--r--morphlib/plugins/branch_and_merge_plugin.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/morphlib/plugins/branch_and_merge_plugin.py b/morphlib/plugins/branch_and_merge_plugin.py
index 9450c67b..434ff6af 100644
--- a/morphlib/plugins/branch_and_merge_plugin.py
+++ b/morphlib/plugins/branch_and_merge_plugin.py
@@ -373,16 +373,17 @@ class BranchAndMergePlugin(cliapp.Plugin):
This would, for example, write out something like:
- /src/ws/master/baserock:baserock/morphs
+ /src/ws/master/baserock/baserock/morphs
- when the master branch of the `baserock:baserock/morphs`
+ when the master branch of the `baserock/baserock/morphs`
repository is checked out.
'''
ws = morphlib.workspace.open('.')
sb = morphlib.sysbranchdir.open_from_within('.')
- self.app.output.write('%s\n' % sb.get_config('branch.root'))
+ repo_url = sb.get_config('branch.root')
+ self.app.output.write('%s\n' % sb.get_git_directory_name(repo_url))
def _remove_branch_dir_safe(self, workspace_root, system_branch_root):
# This function avoids throwing any exceptions, so it is safe to call