--- mga-gnome/trunk/mga-gnome 2012/03/21 19:53:09 3653 +++ mga-gnome/trunk/mga-gnome 2012/03/21 21:49:09 3654 @@ -697,17 +697,15 @@ subprocess.call(['svn', 'revert', '-R', cwd], cwd=cwd) sys.exit(1) - # We can even checkin and submit :-) - if options.submit: - try: - # checkin changes - subprocess.check_call(['mgarepo', 'ci', '-m', 'new version %s' % options.version], cwd=cwd) - # and submit - # XXX HACK NOT TO AUTO SUBMIT ATM - if options.hexdigest is None: - subprocess.check_call(['mgarepo', 'submit'], cwd=cwd) - except subprocess.CalledProcessError: - sys.exit(1) + try: + # If we made it this far, checkin the changes + subprocess.check_call(['mgarepo', 'ci', '-m', 'new version %s' % options.version], cwd=cwd) + + # Submit is optional + if options.submit: + subprocess.check_call(['mgarepo', 'submit'], cwd=cwd) + except subprocess.CalledProcessError: + sys.exit(1) def cmd_parse_ftp_release_list(options, parser): def _send_reply_mail(contents, orig_msg, to, packages=[], error=False): @@ -787,7 +785,9 @@ error = False for package in packages: - cmd = ['mga-gnome', 'increase', '--submit', '--hash', hexdigest] + cmd = ['mga-gnome', 'increase', '--hash', hexdigest] + if options.submit: + cmd.append('--submit') if options.force: cmd.append('--force') cmd.extend((package, version)) @@ -862,6 +862,8 @@ subparser.add_argument("-m", "--mail", help="Email address to send the progress to") subparser.add_argument("-w", "--wait", action="store_true", help="Wait before trying to retrieve the new version") + subparser.add_argument("-s", "--submit", action="store_true", dest="submit", + help="Commit changes and submit") subparser.add_argument("-f", "--force", action="store_true", help="Force submission") subparser.set_defaults(