From 56210f0bf302edb1db3e54cd79e0b29493ecc885 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Thu, 3 May 2012 13:57:51 +0100 Subject: Add --repo-alias setting and default value Nothing uses the setting yet. --- morph | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'morph') 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', -- cgit v1.2.1