|
Lines 1066-1072
class Bugz:
Link Here
|
| 1066 |
except: |
1066 |
except: |
| 1067 |
return {} |
1067 |
return {} |
| 1068 |
|
1068 |
|
| 1069 |
def post(self, title, description, url = '', assigned_to = '', cc = ''): |
1069 |
def post(self, title, description, url = '', assigned_to = '', cc = '', keywords = ''): |
| 1070 |
"""Post a bug |
1070 |
"""Post a bug |
| 1071 |
|
1071 |
|
| 1072 |
@param title: title of the bug. |
1072 |
@param title: title of the bug. |
|
Lines 1079-1084
class Bugz:
Link Here
|
| 1079 |
@type assigned_to: string. |
1079 |
@type assigned_to: string. |
| 1080 |
@keyword cc: option list of CC'd emails |
1080 |
@keyword cc: option list of CC'd emails |
| 1081 |
@type: string |
1081 |
@type: string |
|
|
1082 |
@keyword keywords: option list of bugzilla keywords |
| 1083 |
@type: string |
| 1082 |
|
1084 |
|
| 1083 |
@rtype: int |
1085 |
@rtype: int |
| 1084 |
@return: the bug number, or 0 if submission failed. |
1086 |
@return: the bug number, or 0 if submission failed. |
|
Lines 1092-1097
class Bugz:
Link Here
|
| 1092 |
qparams['assigned_to'] = assigned_to |
1094 |
qparams['assigned_to'] = assigned_to |
| 1093 |
qparams['cc'] = cc |
1095 |
qparams['cc'] = cc |
| 1094 |
qparams['bug_file_loc'] = url |
1096 |
qparams['bug_file_loc'] = url |
|
|
1097 |
qparams['keywords'] = keywords |
| 1095 |
|
1098 |
|
| 1096 |
req_params = urlencode(qparams, True) |
1099 |
req_params = urlencode(qparams, True) |
| 1097 |
req_url = urljoin(self.base, config.urls['post']) |
1100 |
req_url = urljoin(self.base, config.urls['post']) |
|
Lines 1403-1409
class PrettyBugz(Bugz):
Link Here
|
| 1403 |
} |
1406 |
} |
| 1404 |
|
1407 |
|
| 1405 |
def post(self, title = None, description = None, assigned_to = None, |
1408 |
def post(self, title = None, description = None, assigned_to = None, |
| 1406 |
cc = None, url = None, emerge_info = None, description_from = None): |
1409 |
cc = None, url = None, keywords = None, emerge_info = None, |
|
|
1410 |
description_from = None): |
| 1407 |
"""Post a new bug""" |
1411 |
"""Post a new bug""" |
| 1408 |
# As we are submitting something, we should really |
1412 |
# As we are submitting something, we should really |
| 1409 |
# grab entry from console rather than from the command line: |
1413 |
# grab entry from console rather than from the command line: |
|
Lines 1466-1471
class PrettyBugz(Bugz):
Link Here
|
| 1466 |
print 'URL : ' + url |
1470 |
print 'URL : ' + url |
| 1467 |
print 'Assigned to : ' + assigned_to |
1471 |
print 'Assigned to : ' + assigned_to |
| 1468 |
print 'CC : ' + cc |
1472 |
print 'CC : ' + cc |
|
|
1473 |
print 'Keywords : ' + keywords |
| 1469 |
print 'Description : ' |
1474 |
print 'Description : ' |
| 1470 |
print description |
1475 |
print description |
| 1471 |
print '-' * (self.columns - 1) |
1476 |
print '-' * (self.columns - 1) |
|
Lines 1486-1492
class PrettyBugz(Bugz):
Link Here
|
| 1486 |
return |
1491 |
return |
| 1487 |
|
1492 |
|
| 1488 |
|
1493 |
|
| 1489 |
result = Bugz.post(self, title, description, url, assigned_to, cc) |
1494 |
result = Bugz.post(self, title, description, url, assigned_to, cc, keywords) |
| 1490 |
if result != None: |
1495 |
if result != None: |
| 1491 |
self.log('Bug %d submitted' % result) |
1496 |
self.log('Bug %d submitted' % result) |
| 1492 |
else: |
1497 |
else: |
|
Lines 1508-1513
class PrettyBugz(Bugz):
Link Here
|
| 1508 |
'cc': make_option('--cc', help = 'Add a list of emails to CC list'), |
1513 |
'cc': make_option('--cc', help = 'Add a list of emails to CC list'), |
| 1509 |
'url': make_option('-U', '--url', |
1514 |
'url': make_option('-U', '--url', |
| 1510 |
help = 'URL associated with the bug'), |
1515 |
help = 'URL associated with the bug'), |
|
|
1516 |
'keywords': make_option('-k', '--keywords', help = 'List of bugzilla keywords'), |
| 1511 |
} |
1517 |
} |
| 1512 |
|
1518 |
|
| 1513 |
|
1519 |
|