diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-05-03 13:57:51 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-05-04 14:24:07 +0100 |
commit | 56210f0bf302edb1db3e54cd79e0b29493ecc885 (patch) | |
tree | 6713920901ace35dc77145a176d6335cfa4d1146 /morph | |
parent | 34cec56598a84571f93573447a8e7ce941d0b293 (diff) | |
download | morph-56210f0bf302edb1db3e54cd79e0b29493ecc885.tar.gz |
Add --repo-alias setting and default value
Nothing uses the setting yet.
Diffstat (limited to 'morph')
-rwxr-xr-x | morph | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -34,6 +34,14 @@ defaults = { 'git://gitorious.org/baserock-morphs/', 'git://gitorious.org/baserock/', ], + 'repo-alias': [ + 'upstream=' + 'git://gitorious.org/baserock-morphs/%s=' + 'git@gitorious.org:baserock-morphs/%s.git', + 'baserock=' + 'git://gitorious.org/baserock/%s=' + 'git@gitorious.org:baserock/%s.git', + ], 'cachedir': os.path.expanduser('~/.cache/morph'), 'max-jobs': morphlib.util.make_concurrency(), 'prefix': '/usr', @@ -51,6 +59,14 @@ class Morph(cliapp.Application): 'prepend URL to git repos that are not URLs', metavar='URL', default=defaults['git-base-url']) + self.settings.string_list(['repo-alias'], + 'define URL prefix aliases to allow repository ' + 'addresses to be shortened; ' + 'use alias=pullpattern=pushpattern ' + 'to allow alias:shortname to be used instead ' + 'of the full URL; the patterns must contain ' + 'a %s where the shortname gets replaced', + default=defaults['repo-alias']) self.settings.string(['bundle-server'], 'base URL to download bundles', metavar='URL', |