summaryrefslogtreecommitdiff
path: root/morph
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-05-03 13:57:51 +0100
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-05-04 14:24:07 +0100
commit56210f0bf302edb1db3e54cd79e0b29493ecc885 (patch)
tree6713920901ace35dc77145a176d6335cfa4d1146 /morph
parent34cec56598a84571f93573447a8e7ce941d0b293 (diff)
downloadmorph-56210f0bf302edb1db3e54cd79e0b29493ecc885.tar.gz
Add --repo-alias setting and default value
Nothing uses the setting yet.
Diffstat (limited to 'morph')
-rwxr-xr-xmorph16
1 files changed, 16 insertions, 0 deletions
diff --git a/morph b/morph
index 68a6e9d9..5f709b45 100755
--- a/morph
+++ b/morph
@@ -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',