diff options
author | Jared Camins-Esakov <jcamins@cpbibliography.com> | 2013-01-17 21:49:51 -0500 |
---|---|---|
committer | Jared Camins-Esakov <jcamins@cpbibliography.com> | 2013-01-17 21:49:51 -0500 |
commit | c833e94426e3bf317d4780bd4cd240f9a8ede984 (patch) | |
tree | a681bba169ed98dd47177bd5ded841e9bbc9f6de | |
parent | a568b778d3f1a6aea4ff74f59ab26495f6bbbcbe (diff) | |
download | git-bz-c833e94426e3bf317d4780bd4cd240f9a8ede984.tar.gz |
Make changing status and patch complexity at the same time work
-rwxr-xr-x | git-bz | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -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) |