From 612e669d5d8b52fc929b2c05ed32c8eab32330c1 Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Fri, 27 Feb 2015 16:16:05 -0500 Subject: Loosen up sucesss regexes to handle configuration of the "Bug" term bugzilla.mozilla.org is configured so that the title is just "123456" and it just says "123456 processed"; it would also be possible to configure a bugzilla instance to say "Issue" (etc.) instead of "Bug" - try to handle these differences. --- git-bz | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/git-bz b/git-bz index bfeee7a..d255ab1 100755 --- a/git-bz +++ b/git-bz @@ -1302,7 +1302,7 @@ class Bug(object): except urllib2.HTTPError as err: die("Failed to create bug, status=%d" % err.code); - m = check_for_success(response_data, r"\s*Bug\s+([0-9]+)") + m = check_for_success(response_data, r"<title>\s*(\S+\s+)?([0-9]+)") if not m: print response_data die("Failed to create bug") @@ -1392,7 +1392,7 @@ class Bug(object): die ("Failed to update bug %d, status=%d" % (self.id, err.code)) if not check_for_success(response_data, - r"<title>\s*Bug[\S\s]*processed\s*"): + r"[\S\s]{0,100}processed\s*"): # Mid-air collisions would be indicated by # "Mid-air collision!" -- cgit