mirror of
https://github.com/openSUSE/osc.git
synced 2024-11-10 06:46:15 +01:00
prepend request summary to diff in interactive mode
This commit is contained in:
parent
aea395a7e7
commit
4f518b5e59
@ -7216,11 +7216,13 @@ def request_interactive_review(apiurl, request, initial_cmd='', group=None,
|
||||
else:
|
||||
repl = raw_input(prompt).strip()
|
||||
if repl == 'i' and src_actions:
|
||||
req_summary = str(request) + '\n'
|
||||
if not orequest is None and tmpfile:
|
||||
tmpfile.close()
|
||||
tmpfile = None
|
||||
if tmpfile is None:
|
||||
tmpfile = tempfile.NamedTemporaryFile(suffix='.diff')
|
||||
tmpfile.write(req_summary)
|
||||
try:
|
||||
diff = request_diff(apiurl, request.reqid)
|
||||
tmpfile.write(diff)
|
||||
@ -7275,7 +7277,8 @@ def request_interactive_review(apiurl, request, initial_cmd='', group=None,
|
||||
footer = 'changing request from state \'%s\' to \'%s\'\n\n' \
|
||||
% (request.state.name, state)
|
||||
msg_template = change_request_state_template(request, state)
|
||||
footer += str(request)
|
||||
if tmpfile is None:
|
||||
footer += str(request)
|
||||
if tmpfile is not None:
|
||||
tmpfile.seek(0)
|
||||
# the read bytes probably have a moderate size so the str won't be too large
|
||||
|
Loading…
Reference in New Issue
Block a user