From c50d2f6d42019a6aec6a4e3af7b1cf6bf4a48a3f Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 4 Jul 2013 14:18:29 +0000 Subject: Improve docstring for "morph expand-repo" --- morphlib/plugins/expand_repo_plugin.py | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) (limited to 'morphlib/plugins/expand_repo_plugin.py') 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: -- cgit v1.2.1