diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-07-04 14:18:29 +0000 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2013-07-05 14:35:46 +0000 |
commit | c50d2f6d42019a6aec6a4e3af7b1cf6bf4a48a3f (patch) | |
tree | 2b9dc5b61845f7e5275fee9c9137e2e5391de9d0 /morphlib/plugins/expand_repo_plugin.py | |
parent | f156ad69d8415de632fcf03656be562d84182193 (diff) | |
download | morph-c50d2f6d42019a6aec6a4e3af7b1cf6bf4a48a3f.tar.gz |
Improve docstring for "morph expand-repo"
Diffstat (limited to 'morphlib/plugins/expand_repo_plugin.py')
-rw-r--r-- | morphlib/plugins/expand_repo_plugin.py | 24 |
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: |