mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-28 10:46:15 +01:00
Merge pull request #1007 from glaubitz/submitreq
Add -F option to osc submitreq
This commit is contained in:
commit
345d0c8d26
@ -1177,6 +1177,8 @@ class Osc(cmdln.Cmdln):
|
|||||||
|
|
||||||
@cmdln.option('-m', '--message', metavar='TEXT',
|
@cmdln.option('-m', '--message', metavar='TEXT',
|
||||||
help='specify message TEXT')
|
help='specify message TEXT')
|
||||||
|
@cmdln.option('-F', '--file', metavar='FILE',
|
||||||
|
help='read log message from FILE, \'-\' denotes standard input.')
|
||||||
@cmdln.option('-r', '--revision', metavar='REV',
|
@cmdln.option('-r', '--revision', metavar='REV',
|
||||||
help='specify a certain source revision ID (the md5 sum) for the source package')
|
help='specify a certain source revision ID (the md5 sum) for the source package')
|
||||||
@cmdln.option('-s', '--supersede', metavar='REQUEST_ID',
|
@cmdln.option('-s', '--supersede', metavar='REQUEST_ID',
|
||||||
@ -1257,6 +1259,14 @@ class Osc(cmdln.Cmdln):
|
|||||||
|
|
||||||
if opts.message:
|
if opts.message:
|
||||||
opts.message = str(opts.message.encode().decode('unicode_escape'))
|
opts.message = str(opts.message.encode().decode('unicode_escape'))
|
||||||
|
elif opts.file:
|
||||||
|
if opts.file == '-':
|
||||||
|
opts.message = sys.stdin.read()
|
||||||
|
else:
|
||||||
|
try:
|
||||||
|
opts.message = open(opts.file).read()
|
||||||
|
except:
|
||||||
|
sys.exit('could not open file \'%s\'.' % opts.file)
|
||||||
|
|
||||||
myreqs = []
|
myreqs = []
|
||||||
if opts.supersede:
|
if opts.supersede:
|
||||||
|
Loading…
Reference in New Issue
Block a user