1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-09-20 09:16:16 +02:00

Show diff when creating a new comment (interactive_review)

Note that the diff is only shown, if it was requested before (that is
the "i" command was issued). The new behavior is consistent with the
other commands like "a", "d" etc.
This commit is contained in:
Marcus Huewe 2018-04-26 16:54:10 +02:00
parent cbd10644a2
commit d756f56af2

View File

@ -7375,7 +7375,11 @@ def request_interactive_review(apiurl, request, initial_cmd='', group=None,
print('Aborting', file=sys.stderr)
raise oscerr.UserAbort()
elif repl == 'm':
comment = edit_text()
if tmpfile is not None:
tmpfile.seek(0)
comment = edit_message(footer=tmpfile.read())
else:
comment = edit_text()
create_comment(apiurl, 'request', comment, request.reqid)
elif repl == 'b' and src_actions:
print_source_buildstatus(src_actions)