Skip to content

Commit

Permalink
Merge branch 'show_overview_in_diff' of https://github.com/lethliel/osc
Browse files Browse the repository at this point in the history
Show request details, when displaying a diff in the interactive
review mode.
  • Loading branch information
marcus-h committed Oct 11, 2017
2 parents 0eecdaf + 4f518b5 commit 760a3e5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion osc/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -7223,11 +7223,13 @@ def print_source_buildstatus(src_actions, newline=False):
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)
Expand Down Expand Up @@ -7282,7 +7284,8 @@ def print_source_buildstatus(src_actions, newline=False):
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
Expand Down

0 comments on commit 760a3e5

Please sign in to comment.