mirror of
https://github.com/openSUSE/osc.git
synced 2024-12-29 03:06:15 +01:00
Merge branch 'show_overview_in_diff' of https://github.com/lethliel/osc
Show request details, when displaying a diff in the interactive review mode.
This commit is contained in:
commit
760a3e5558
@ -7223,11 +7223,13 @@ def request_interactive_review(apiurl, request, initial_cmd='', group=None,
|
|||||||
else:
|
else:
|
||||||
repl = raw_input(prompt).strip()
|
repl = raw_input(prompt).strip()
|
||||||
if repl == 'i' and src_actions:
|
if repl == 'i' and src_actions:
|
||||||
|
req_summary = str(request) + '\n'
|
||||||
if not orequest is None and tmpfile:
|
if not orequest is None and tmpfile:
|
||||||
tmpfile.close()
|
tmpfile.close()
|
||||||
tmpfile = None
|
tmpfile = None
|
||||||
if tmpfile is None:
|
if tmpfile is None:
|
||||||
tmpfile = tempfile.NamedTemporaryFile(suffix='.diff')
|
tmpfile = tempfile.NamedTemporaryFile(suffix='.diff')
|
||||||
|
tmpfile.write(req_summary)
|
||||||
try:
|
try:
|
||||||
diff = request_diff(apiurl, request.reqid)
|
diff = request_diff(apiurl, request.reqid)
|
||||||
tmpfile.write(diff)
|
tmpfile.write(diff)
|
||||||
@ -7282,7 +7284,8 @@ def request_interactive_review(apiurl, request, initial_cmd='', group=None,
|
|||||||
footer = 'changing request from state \'%s\' to \'%s\'\n\n' \
|
footer = 'changing request from state \'%s\' to \'%s\'\n\n' \
|
||||||
% (request.state.name, state)
|
% (request.state.name, state)
|
||||||
msg_template = change_request_state_template(request, state)
|
msg_template = change_request_state_template(request, state)
|
||||||
footer += str(request)
|
if tmpfile is None:
|
||||||
|
footer += str(request)
|
||||||
if tmpfile is not None:
|
if tmpfile is not None:
|
||||||
tmpfile.seek(0)
|
tmpfile.seek(0)
|
||||||
# the read bytes probably have a moderate size so the str won't be too large
|
# the read bytes probably have a moderate size so the str won't be too large
|
||||||
|
Loading…
Reference in New Issue
Block a user