summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2009-08-15 19:41:57 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2009-08-15 19:41:57 -0400
commitfa0b3a32ae62430609c52f62e658f6bc114a320e (patch)
treec994d123feb43e6554728ceb2e3a855a0925ecea
parentf15af50ac558eacaf2fd4f641df52975ffd05145 (diff)
Fix to work with Bugzilla 3.4
Bugzilla 3.4 (like the new GNOME bugzilla) - Requires a status for attached patches - Uses a different title for succesful attachments
-rwxr-xr-xgit-bz7
1 files changed, 5 insertions, 2 deletions
diff --git a/git-bz b/git-bz
index f6b1b54..0caff57 100755
--- a/git-bz
+++ b/git-bz
@@ -798,6 +798,7 @@ class Bug(object):
fields['bugid'] = str(self.id)
fields['action'] = 'insert'
fields['ispatch'] = '1'
+ fields['attachments.status'] = 'none'
fields['description'] = description
if comment:
fields['comment'] = comment
@@ -817,10 +818,12 @@ class Bug(object):
if response.status != 200:
die ("Failed to attach patch to bug: status=%d" % response.status)
- # We hope that this is constant across bugzilla versions for a
- # successful attachment
+ # Older bugzilla's used this for successful attachments
m = re.search(r"<title>\s*Changes\s+Submitted", response_data)
if not m:
+ # Newer bugzilla's, use, instead:
+ m = re.search(r"<title>\s*Attachment\s+\d+\s+added", response_data)
+ if not m:
print response_data
die ("Failed to attach patch to bug")