From 88a840788e82289d417983acf4b49f2c2778296d Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Tue, 4 Jan 2011 16:15:53 +0000 Subject: fix problem with python threads on 2010.1 --- RepSys/commands/authoremail.py | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 RepSys/commands/authoremail.py (limited to 'RepSys/commands/authoremail.py') diff --git a/RepSys/commands/authoremail.py b/RepSys/commands/authoremail.py new file mode 100644 index 0000000..f5b8b70 --- /dev/null +++ b/RepSys/commands/authoremail.py @@ -0,0 +1,37 @@ +#!/usr/bin/python +from RepSys import Error, config +from RepSys.command import * +import sys +import getopt + +HELP = """\ +Usage: repsys authoremail [OPTIONS] AUTHOR + +Shows the e-mail of an SVN author. It is just a simple interface to access +the [authors] section of repsys.conf. + +Options: + -h Show this message + +Examples: + repsys authoremail john +""" + +def parse_options(): + parser = OptionParser(help=HELP) + opts, args = parser.parse_args() + if len(args) != 1: + raise Error, "invalid arguments" + opts.author = args[0] + return opts + +def print_author_email(author): + email = config.get("users", author) + if not email: + raise Error, "author not found" + print email + +def main(): + do_command(parse_options, print_author_email) + +# vim:et:ts=4:sw=4 -- cgit v1.2.1