Change more instances of "CVS to SCM".
Recognize additional "New Package FOO Request" lines.
This commit is contained in:
parent
26117e4144
commit
fe6ac25135
1 changed files with 9 additions and 5 deletions
|
@ -221,6 +221,8 @@ def parse_prefixed_lines(s):
|
||||||
# Skip until the Request line
|
# Skip until the Request line
|
||||||
while 1:
|
while 1:
|
||||||
if (lines[0].find('New Package CVS Request') == 0
|
if (lines[0].find('New Package CVS Request') == 0
|
||||||
|
or lines[0].find('New Package GIT Request') == 0
|
||||||
|
or lines[0].find('New Package SCM Request') == 0
|
||||||
or lines[0].find('Package Change Request') == 0):
|
or lines[0].find('Package Change Request') == 0):
|
||||||
break
|
break
|
||||||
lines.pop(0)
|
lines.pop(0)
|
||||||
|
@ -254,7 +256,7 @@ def parse_prefixed_lines(s):
|
||||||
return items
|
return items
|
||||||
|
|
||||||
def clean_request(items):
|
def clean_request(items):
|
||||||
'''Clean up various bits that can be passed in a CVS request.'''
|
'''Clean up various bits that can be passed in a request.'''
|
||||||
request = {}
|
request = {}
|
||||||
|
|
||||||
if not 'InitialCC' in items:
|
if not 'InitialCC' in items:
|
||||||
|
@ -304,7 +306,7 @@ def new_request_string(items, bug):
|
||||||
r.append("Bug URL: http://bugzilla.redhat.com/%d " % bug.bug_id)
|
r.append("Bug URL: http://bugzilla.redhat.com/%d " % bug.bug_id)
|
||||||
r.append("Bug summary: " + bug.short_desc)
|
r.append("Bug summary: " + bug.short_desc)
|
||||||
r.append('')
|
r.append('')
|
||||||
r.append("New Package CVS Request")
|
r.append("New Package SCM Request")
|
||||||
r.append("=======================")
|
r.append("=======================")
|
||||||
r.append("Package Name: " + items['Package Name'])
|
r.append("Package Name: " + items['Package Name'])
|
||||||
r.append("Short Description: " + items['Short Description'])
|
r.append("Short Description: " + items['Short Description'])
|
||||||
|
@ -357,7 +359,7 @@ def process_no_request(bug, allcomments):
|
||||||
'''Deal with a ticket where no request was found.'''
|
'''Deal with a ticket where no request was found.'''
|
||||||
while 1:
|
while 1:
|
||||||
os.system('clear')
|
os.system('clear')
|
||||||
print "No CVS request found in bug %d\nhttp://bugzilla.redhat.com/%d." % (bug.bug_id, bug.bug_id)
|
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, c=Comment, q=Quit):')
|
||||||
if ok == 'c':
|
if ok == 'c':
|
||||||
bug_comment = edit_string('')
|
bug_comment = edit_string('')
|
||||||
|
@ -389,7 +391,7 @@ def process_new_request(bug, comment, allcomments, firstfound, pkgdb, branches):
|
||||||
request = clean_request(items)
|
request = clean_request(items)
|
||||||
|
|
||||||
if not firstfound:
|
if not firstfound:
|
||||||
warnings.append("WARNING: CVS request was not the last comment.")
|
warnings.append("WARNING: SCM request was not the last comment.")
|
||||||
warned = True
|
warned = True
|
||||||
if not 'Package Name' in items:
|
if not 'Package Name' in items:
|
||||||
warnings.append("WARNING: No package name supplied.")
|
warnings.append("WARNING: No package name supplied.")
|
||||||
|
@ -622,7 +624,9 @@ if __name__ == '__main__':
|
||||||
type = ''
|
type = ''
|
||||||
print "Parsing bug %d - https://bugzilla.redhat.com/%d" % (i.bug_id, i.bug_id)
|
print "Parsing bug %d - https://bugzilla.redhat.com/%d" % (i.bug_id, i.bug_id)
|
||||||
for j in reversed(comments['bugs'][str(i.bug_id)]['comments']):
|
for j in reversed(comments['bugs'][str(i.bug_id)]['comments']):
|
||||||
if 'New Package CVS Request' in j['text']:
|
if ('New Package CVS Request' in j['text']
|
||||||
|
or 'New Package GIT Request' in j['text']
|
||||||
|
or 'New Package SCM Request' in j['text']):
|
||||||
type = 'new'
|
type = 'new'
|
||||||
break
|
break
|
||||||
if 'Package Change Request' in j['text']:
|
if 'Package Change Request' in j['text']:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue