1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-08-29 09:24:10 +02:00

- only allow --diff for submit requests

This commit is contained in:
Marcus Huewe
2010-03-30 00:31:01 +02:00
parent ea3e5d20bf
commit 6b10a47fbc
2 changed files with 6 additions and 1 deletions

View File

@@ -4636,6 +4636,9 @@ def request_interactive_review(apiurl, request):
while True:
repl = raw_input('d(i)ff/(a)ccept/(d)ecline/(r)evoke/(c)ancel > ')
if repl == 'i':
if request.actions[0].type != 'submit':
print >>sys.stderr, 'diff is not possible for request type: \'%s\'' % request.actions[0].type
continue
if tmpfile is None:
tmpfile = tempfile.NamedTemporaryFile()
tmpfile.write(server_diff(apiurl, request.actions[0].dst_project, request.actions[0].dst_package, None,