5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-19 02:10:54 +08:00

SQOOP-1104. Sqoop2: Allow versioned patches in the PreCommit hook

(Jarek Jarcec Cecho via Hari Shreedharan)
This commit is contained in:
Hari Shreedharan 2013-06-25 16:24:53 -07:00
parent d62567ddf3
commit 60a909f30b

View File

@ -135,7 +135,7 @@ def jira_post_comment(result, defect, branch, username, password):
# hack (from hadoop) but REST api doesn't list attachments?
def jira_get_attachment(result, defect, username, password):
html = jira_get_defect_html(result, defect, username, password)
pattern = "(/secure/attachment/[0-9]+/(bug)?%s[0-9\-]*\.(patch|txt|patch\.txt))" % (re.escape(defect))
pattern = "(/secure/attachment/[0-9]+/(bug)?%s[0-9\-]*((\.|-)[0-9]+)?\.(patch|txt|patch\.txt))" % (re.escape(defect))
matches = []
for match in re.findall(pattern, html, re.IGNORECASE):
matches += [ match[0] ]