summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJared Camins-Esakov <jcamins@cpbibliography.com>2013-01-17 21:49:51 -0500
committerJared Camins-Esakov <jcamins@cpbibliography.com>2013-01-17 21:49:51 -0500
commitc833e94426e3bf317d4780bd4cd240f9a8ede984 (patch)
treea681bba169ed98dd47177bd5ded841e9bbc9f6de
parenta568b778d3f1a6aea4ff74f59ab26495f6bbbcbe (diff)
downloadgit-bz-c833e94426e3bf317d4780bd4cd240f9a8ede984.tar.gz
Make changing status and patch complexity at the same time work
-rwxr-xr-xgit-bz14
1 files changed, 9 insertions, 5 deletions
diff --git a/git-bz b/git-bz
index d569bdb..65b4d7c 100755
--- a/git-bz
+++ b/git-bz
@@ -1867,17 +1867,21 @@ def attach_commits(bug, commits, include_comments=True, edit_comments=False, sta
statuses = []
patch_complexities = []
+ bug_changes = {}
+
if len(statuses) > 0:
- bug_changes = {}
bug_changes['bug_status'] = statuses[0]
- bug.update(**bug_changes)
- print "Updated bug status to '%s'" % bug_changes['bug_status']
if len(patch_complexities) > 0:
- bug_changes = {}
bug_changes['cf_patch_complexity'] = patch_complexities[0]
+
+ if len(statuses) > 0 or len(patch_complexities) > 0:
bug.update(**bug_changes)
- print "Updated patch complexity to '%s'" % bug_changes['cf_patch_complexity']
+ if len(patch_complexities) > 0:
+ print "Updated patch complexity to '%s'" % bug_changes['cf_patch_complexity']
+
+ if len(statuses) > 0:
+ print "Updated bug status to '%s'" % bug_changes['bug_status']
bug.create_patch(description, body, filename, patch, obsoletes=obsoletes, status=status)