mirror of
https://github.com/openSUSE/osc.git
synced 2025-02-13 14:05:06 +01:00
just edit option for buildvc and osc vc commands, used /usr/lib/build/vc in osc vc
This commit is contained in:
parent
90cb8163b6
commit
a49d15edbd
1
NEWS
1
NEWS
@ -7,6 +7,7 @@
|
|||||||
- new repairlink command for repairing a broken source link (requires server version 1.6)
|
- new repairlink command for repairing a broken source link (requires server version 1.6)
|
||||||
- '-b|--brief' option for osc submitreq show subcommand
|
- '-b|--brief' option for osc submitreq show subcommand
|
||||||
- use "latest" revision on checkout, not "upload" (#441783)
|
- 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:
|
0.116:
|
||||||
- support listings of older revisions with "osc ls -R"
|
- support listings of older revisions with "osc ls -R"
|
||||||
|
@ -2919,11 +2919,13 @@ Please submit there instead, or use --nodevelproject to force direct submission.
|
|||||||
print 'fix the conflicts, and commit the changes.'
|
print 'fix the conflicts, and commit the changes.'
|
||||||
|
|
||||||
@cmdln.option('-m', '--message',
|
@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):
|
def do_vc(self, subcmd, opts, *args):
|
||||||
"""${cmd_name}: Edit the changes file
|
"""${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
|
If no <filename> is given, exactly one *.changes or *.spec file has to
|
||||||
be in the cwd or in path.
|
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
|
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, 'Error: you need build.rpm with version 2009.04.17 or newer'
|
||||||
print >>sys.stderr, 'See http://download.opensuse.org/repositories/openSUSE:/Tools/'
|
print >>sys.stderr, 'See http://download.opensuse.org/repositories/openSUSE:/Tools/'
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
cmd_list = ["/usr/bin/buildvc", ]
|
cmd_list = ["/usr/lib/build/vc", ]
|
||||||
|
|
||||||
if len(args) > 0:
|
if len(args) > 0:
|
||||||
arg = 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("-m")
|
||||||
cmd_list.append("'%s'" % opts.message)
|
cmd_list.append("'%s'" % opts.message)
|
||||||
|
|
||||||
|
if opts.just_edit:
|
||||||
|
cmd_list.append("-e")
|
||||||
|
|
||||||
if arg:
|
if arg:
|
||||||
cmd_list.append(arg)
|
cmd_list.append(arg)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user