aboutsummaryrefslogtreecommitdiffstats
path: root/repsys
diff options
context:
space:
mode:
Diffstat (limited to 'repsys')
-rwxr-xr-xrepsys46
1 files changed, 20 insertions, 26 deletions
diff --git a/repsys b/repsys
index c68df11..67bb180 100755
--- a/repsys
+++ b/repsys
@@ -3,33 +3,31 @@ from RepSys import Error, plugins
from RepSys.command import *
import getopt
import sys
-import codecs
-import locale
-
-VERSION="1.7.r%s" % ("$Rev$".split()[-2].strip())
+VERSION="1.6.20"
HELP = """\
Usage: repsys COMMAND [COMMAND ARGUMENTS]
+Tool to access and manage a package repository structure.
+
+http://wiki.mandriva.com/en/Development/Packaging/RepositorySystem/Quickstart
+
Useful commands:
- co
- sync
- ci
- submit
- create
- getspec
- getsrpm
- rpmlog
- changed
- authoremail
- putsrpm
- switch
+ co checkout a package
+ ci commit changes
+ sync add-remove all file changes from the .spec
+ submit submit a package for build
+ getspec prints the spec
+ rpmlog prints the RPM changelog
+ getsrpm creates the source RPM
+ create create the structure of a new package
+ changed shows changes not submitted
+ authoremail prints the e-mail of a given author
+ switch relocate to mirror or upstream repository
Run "repsys COMMAND --help" for more information.
-Run "repsys --help-plugins" for help on loaded plugins.
-
Written by Gustavo Niemeyer <gustavo@niemeyer.net>
"""
@@ -68,11 +66,10 @@ def dispatch_command(command, argv, debug=0):
commands_module = getattr(repsys_module, "commands")
command_module = getattr(commands_module, command)
except (ImportError, AttributeError):
- if debug:
- import traceback
- traceback.print_exc()
- sys.exit(1)
- raise Error, "invalid command '%s'" % command
+ etype, exc, tb = sys.exc_info()
+ if tb.tb_next is None and not debug:
+ raise Error, "invalid command '%s'" % command
+ raise
command_module.main()
if __name__ == "__main__":
@@ -81,9 +78,6 @@ if __name__ == "__main__":
except Error, e:
sys.stderr.write("plugin initialization error: %s\n" % e)
sys.exit(1)
- encoding = locale.getpreferredencoding()
- sys.stdout = codecs.getwriter(encoding)(sys.stdout, errors="replace")
- sys.stderr = codecs.getwriter(encoding)(sys.stderr, errors="replace")
do_command(parse_options, dispatch_command)
# vim:et:ts=4:sw=4