From 5c7f585c08c8ffb944095ae031fbf82a54ba13bc Mon Sep 17 00:00:00 2001 From: Bogdano Arendartchuk Date: Thu, 17 Jul 2008 12:24:21 +0000 Subject: Allow specifying distro branches without using complete URLs Added the configuration option "repository", which will have the URL to the root of the repository. The change also allowed using mirrors in all the read-only commands. --- repsys | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'repsys') diff --git a/repsys b/repsys index 67bb180..3869119 100755 --- a/repsys +++ b/repsys @@ -1,5 +1,5 @@ #!/usr/bin/python -from RepSys import Error, plugins +from RepSys import Error, plugins, config from RepSys.command import * import getopt import sys @@ -50,8 +50,12 @@ def parse_options(): parser.add_option("--help-plugins", action="callback", callback=plugin_help) parser.add_option("--help-plugin", type="string", dest="__ignore", action="callback", callback=plugin_help) + parser.add_option("--no-mirror", "-M", action="store_false", + dest="_mirror", default=True) opts, args = parser.parse_args() + config.set("global", "use-mirror", opts._mirror and "yes" or "no") del opts.__ignore + del opts._mirror if len(args) < 1: parser.print_help(sys.stderr) sys.exit(1) -- cgit v1.2.1