1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-02-04 10:36:17 +01:00

just edit option for buildvc and osc vc commands, used /usr/lib/build/vc in osc vc

This commit is contained in:
Michal Vyskocil 2009-04-22 14:44:17 +00:00
parent 90cb8163b6
commit a49d15edbd
2 changed files with 10 additions and 4 deletions

1
NEWS
View File

@ -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"

View File

@ -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 <filename> 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)