summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--morphlib/plugins/expand_repo_plugin.py24
1 files changed, 21 insertions, 3 deletions
diff --git a/morphlib/plugins/expand_repo_plugin.py b/morphlib/plugins/expand_repo_plugin.py
index 16087c6b..4c8ab126 100644
--- a/morphlib/plugins/expand_repo_plugin.py
+++ b/morphlib/plugins/expand_repo_plugin.py
@@ -22,15 +22,33 @@ import morphlib
class ExpandRepoPlugin(cliapp.Plugin):
'''Expand an aliased repo URL to be unaliases.'''
-
+
def enable(self):
self.app.add_subcommand(
'expand-repo', self.expand_repo, arg_synopsis='[REPOURL...]')
-
+
def disable(self):
pass
-
+
def expand_repo(self, args):
+ '''Expand repo aliases in URLs.
+
+ Command line arguments:
+
+ * `REPOURL` is a URL that may or may not be using repository
+ aliases.
+
+ See the `--repo-alias` option for more about repository aliases.
+
+ Example:
+
+ $ morph expand-repo baserock:baserock/morphs
+ Original: baserock:baserock/morphs
+ pull: git://trove.baserock.org/baserock/baserock/morphs
+ push: ssh://git@git.baserock.org/baserock/baserock/morphs
+
+ '''
+
aliases = self.app.settings['repo-alias']
resolver = morphlib.repoaliasresolver.RepoAliasResolver(aliases)
for repourl in args: