summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xgit-bz9
1 files changed, 8 insertions, 1 deletions
diff --git a/git-bz b/git-bz
index fd36d74..c1493ac 100755
--- a/git-bz
+++ b/git-bz
@@ -571,7 +571,14 @@ class Bug(object):
response_data = response.read()
if response.status != 200:
- die ("Failed to attach bug: %d" % response.status)
+ die ("Failed to attach patch to bug: status=%d" % response.status)
+
+ # We hope that this is constant across bugzilla versions for a
+ # successful attachment
+ m = re.search(r"<title>\s*Changes\s+Submitted", response_data)
+ if not m:
+ print response_data
+ die ("Failed to attach patch to bug")
print "Attached %s" % filename