summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2015-02-27 16:16:05 -0500
committerOwen W. Taylor <otaylor@fishsoup.net>2015-02-27 16:18:23 -0500
commit612e669d5d8b52fc929b2c05ed32c8eab32330c1 (patch)
tree3a160254c37c0ec03c16ede2ba9a126c7817386f
parenta1ed1a7fc69053667ddf1e82e38a8e993a0ca31d (diff)
downloadgit-bz-612e669d5d8b52fc929b2c05ed32c8eab32330c1.tar.gz
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.
-rwxr-xr-xgit-bz4
1 files 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"<title>\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*</title>"):
+ r"<title>[\S\s]{0,100}processed\s*</title>"):
# Mid-air collisions would be indicated by
# "<title>Mid-air collision!</title>"