From 49ba6c0c019c7402d663cdc2d4ef4002ce25b4d7 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Wed, 8 Feb 2012 13:59:59 +0000 Subject: [PATCH] Add support for bug format LP: #nnnnnn Now support any number/sequence of whitespace, : and # between LP and bug number Fixes bug: 928444 Change-Id: I2cd1aba469523d300e2b24f6de0e60e4e306c501 --- gerrit/update_bug.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gerrit/update_bug.py b/gerrit/update_bug.py index dc385bdc..e9781250 100755 --- a/gerrit/update_bug.py +++ b/gerrit/update_bug.py @@ -136,7 +136,7 @@ def process_bugtask(launchpad, bugtask, git_log, args): def find_bugs(launchpad, git_log, args): """Find bugs referenced in the git log and return related bugtasks""" - bug_regexp = r'([Bb]ug|[Ll][Pp])\s*[#:]?\s*(\d+)' + bug_regexp = r'([Bb]ug|[Ll][Pp])[\s#:]*(\d+)' tokens = re.split(bug_regexp, git_log) # Extract unique bug tasks