diff --git a/NEWS b/NEWS index e44c08cc..feee6300 100644 --- a/NEWS +++ b/NEWS @@ -7,6 +7,7 @@ - new repairlink command for repairing a broken source link (requires server version 1.6) - '-b|--brief' option for osc submitreq show subcommand - use "latest" revision on checkout, not "upload" (#441783) +- '-e|--just-open' option for vc command and used /usr/lib/build/vc as an executable 0.116: - support listings of older revisions with "osc ls -R" diff --git a/osc/commandline.py b/osc/commandline.py index 8d384be3..4323f87b 100755 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -2919,11 +2919,13 @@ Please submit there instead, or use --nodevelproject to force direct submission. print 'fix the conflicts, and commit the changes.' @cmdln.option('-m', '--message', - help='Change message') + help='add MESSAGE to changes (not open an editor)') + @cmdln.option('-e', '--just-edit', action='store_true', default=False, + help='just open changes (cannot be used with -m)') def do_vc(self, subcmd, opts, *args): """${cmd_name}: Edit the changes file - osc vc [filename[.changes]|path [file_with_comment]] + osc vc [-m MESSAGE|-e] [filename[.changes]|path [file_with_comment]] If no is given, exactly one *.changes or *.spec file has to be in the cwd or in path. @@ -2942,12 +2944,12 @@ Please submit there instead, or use --nodevelproject to force direct submission. from subprocess import Popen, PIPE - if not os.path.exists('/usr/bin/buildvc'): + if not os.path.exists('/usr/lib/build/vc'): print >>sys.stderr, 'Error: you need build.rpm with version 2009.04.17 or newer' print >>sys.stderr, 'See http://download.opensuse.org/repositories/openSUSE:/Tools/' return 1 - cmd_list = ["/usr/bin/buildvc", ] + cmd_list = ["/usr/lib/build/vc", ] if len(args) > 0: arg = args[0] @@ -2975,6 +2977,9 @@ Please submit there instead, or use --nodevelproject to force direct submission. cmd_list.append("-m") cmd_list.append("'%s'" % opts.message) + if opts.just_edit: + cmd_list.append("-e") + if arg: cmd_list.append(arg)