diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2008-02-05 20:47:14 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2008-02-05 20:47:14 +0000 |
commit | 007212afccceca682e0f98f2871398a3ff35db03 (patch) | |
tree | 0156f2a3dc51b2e548ca5262073af98b1a7fe29f | |
parent | e196e676aa302cd3a1f7b37f259491a8b03cc483 (diff) | |
download | mgarepo-007212afccceca682e0f98f2871398a3ff35db03.tar mgarepo-007212afccceca682e0f98f2871398a3ff35db03.tar.gz mgarepo-007212afccceca682e0f98f2871398a3ff35db03.tar.bz2 mgarepo-007212afccceca682e0f98f2871398a3ff35db03.tar.xz mgarepo-007212afccceca682e0f98f2871398a3ff35db03.zip |
Added option -F to repsys ci, as in svn ci
-rw-r--r-- | CHANGES | 1 | ||||
-rw-r--r-- | RepSys/commands/ci.py | 4 | ||||
-rw-r--r-- | RepSys/rpmutil.py | 11 |
3 files changed, 12 insertions, 4 deletions
@@ -8,6 +8,7 @@ interactivity at all with ssh - fixed bad url used when using -v in getsrpm - make 'repsys submit' without package name or revision number work again +- added option -F to repsys ci to set a log message file - the fix for the unreleased commits problem in the previous release was wrong, really fixed it - don't give the wrong message "invalid command 'CMD'" when this is not diff --git a/RepSys/commands/ci.py b/RepSys/commands/ci.py index 9ffa3bd..b6a54f6 100644 --- a/RepSys/commands/ci.py +++ b/RepSys/commands/ci.py @@ -11,6 +11,8 @@ in case the option "mirror" is set in repsys.conf. Options: -h Show this message + -m MSG Use the MSG as the log message + -F FILE Read log message from FILE Examples: repsys ci @@ -20,6 +22,8 @@ Examples: def parse_options(): parser = OptionParser(help=HELP) parser.add_option("-m", dest="message", default=None) + parser.add_option("-F", dest="logfile", type="string", + default=None) opts, args = parser.parse_args() if len(args): opts.target = args[0] diff --git a/RepSys/rpmutil.py b/RepSys/rpmutil.py index a461fc2..7481b72 100644 --- a/RepSys/rpmutil.py +++ b/RepSys/rpmutil.py @@ -437,7 +437,7 @@ def sync(dryrun=False): if not dryrun: svn.add(path, local=True) -def commit(target=".", message=None): +def commit(target=".", message=None, logfile=None): svn = SVN() status = svn.status(target, quiet=True) if not status: @@ -453,10 +453,13 @@ def commit(target=".", message=None): print "relocated to", newurl # we can't use the svn object here because svn --non-interactive option # hides VISUAL - mopt = "" + opts = [] if message is not None: - mopt = "-m \"%s\"" % message - os.system("svn ci %s %s" % (mopt, target)) + opts.append("-m \"%s\"" % message) + if logfile is not None: + opts.append("-F \"%s\"" % logfile) + mopts = " ".join(opts) + os.system("svn ci %s %s" % (mopts, target)) if mirrored: print "use \"repsys switch\" in order to switch back to mirror "\ "later" |