Add option to open BZ in browser, to speed up closer inspection.
This commit is contained in:
parent
7099e54c23
commit
c210ddbff8
1 changed files with 12 additions and 5 deletions
|
@ -28,6 +28,7 @@ import subprocess
|
|||
import tempfile
|
||||
import time
|
||||
import xmlrpclib
|
||||
import webbrowser
|
||||
from configobj import ConfigObj, flatten_errors
|
||||
from fedora.client import AccountSystem, AuthError, AppError, PackageDB
|
||||
from optparse import OptionParser
|
||||
|
@ -386,7 +387,7 @@ def process_no_request(bug, allcomments):
|
|||
while 1:
|
||||
clear()
|
||||
print "No SCM request found in bug %d\nhttp://bugzilla.redhat.com/%d." % (bug.bug_id, bug.bug_id)
|
||||
ok = raw_input('\nWhat do? (n=Next, s=Show ticket, c=Comment, q=Quit):')
|
||||
ok = raw_input('\nWhat do? (n=Next, s=Show ticket, b=Show ticket in browser, c=Comment, q=Quit):')
|
||||
if ok == 'c':
|
||||
bug_comment = edit_string('')
|
||||
print bug_comment
|
||||
|
@ -406,6 +407,8 @@ def process_no_request(bug, allcomments):
|
|||
elif ok == 's':
|
||||
print
|
||||
display_bug(bug, allcomments)
|
||||
elif ok == 'b':
|
||||
webbrowser.open("http://bugzilla.redhat.com/" + str(bug.bug_id), new=1)
|
||||
return True
|
||||
|
||||
def check_owners(fas, owner, comaintainers, cc_list):
|
||||
|
@ -495,9 +498,9 @@ def process_new_request(bug, comment, allcomments, firstfound, pkgdb, fas, branc
|
|||
req_string = new_request_string(items, bug)
|
||||
bug_comment = 'Git done (by process-git-requests).\n'
|
||||
|
||||
okprompt = 'Do it (yes=Yes, n=No, e=Edit request, s=Show ticket, c=Comment, q=Quit)?'
|
||||
okprompt = 'Do it (yes=Yes, n=No, e=Edit request, s=Show ticket, b=Show ticket in browser, c=Comment, q=Quit)?'
|
||||
if warned:
|
||||
prompt = 'Warnings present!\nDo it (a=Accept warnings, n=No, e=Edit request, s=Show ticket, c=Comment, q=Quit)?'
|
||||
prompt = 'Warnings present!\nDo it (a=Accept warnings, n=No, e=Edit request, s=Show ticket, b=Show ticket in browser, c=Comment, q=Quit)?'
|
||||
else:
|
||||
prompt = okprompt
|
||||
|
||||
|
@ -539,6 +542,8 @@ def process_new_request(bug, comment, allcomments, firstfound, pkgdb, fas, branc
|
|||
elif ok == 's':
|
||||
print
|
||||
display_bug(bug, allcomments)
|
||||
elif ok == 'b':
|
||||
webbrowser.open("http://bugzilla.redhat.com/" + str(bug.bug_id), new=1)
|
||||
elif ok == 'yes' and not warned:
|
||||
bug_comment = edit_string(bug_comment)
|
||||
print '\n', bug_comment
|
||||
|
@ -616,9 +621,9 @@ def process_change_request(bug, comment, allcomments, firstfound, pkgdb, branche
|
|||
req_string = change_request_string(items, bug)
|
||||
bug_comment = 'Git done (by process-git-requests).\n'
|
||||
|
||||
okprompt = 'Do it (yes=Yes, n=No, e=Edit request, s=Show ticket, c=Comment, q=Quit)?'
|
||||
okprompt = 'Do it (yes=Yes, n=No, e=Edit request, s=Show ticket, b=Show ticket in browser, c=Comment, q=Quit)?'
|
||||
if warned:
|
||||
prompt = 'Warnings present!\nDo it (a=Accept warnings, n=No, e=Edit request, s=Show ticket, c=Comment, q=Quit)?'
|
||||
prompt = 'Warnings present!\nDo it (a=Accept warnings, n=No, e=Edit request, s=Show ticket, b=Show ticket in browser, c=Comment, q=Quit)?'
|
||||
else:
|
||||
prompt = okprompt
|
||||
|
||||
|
@ -659,6 +664,8 @@ def process_change_request(bug, comment, allcomments, firstfound, pkgdb, branche
|
|||
elif ok == 's':
|
||||
print
|
||||
display_bug(bug, allcomments)
|
||||
elif ok == 'b':
|
||||
webbrowser.open("http://bugzilla.redhat.com/" + str(bug.bug_id), new=1)
|
||||
elif ok == 'yes' and not warned:
|
||||
bug_comment = edit_string(bug_comment)
|
||||
print '\n', bug_comment
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue