From 025fd83a22faed4b2f0959645cc286a33ac0419b Mon Sep 17 00:00:00 2001 From: "Owen W. Taylor" Date: Sat, 4 Feb 2012 17:44:12 -0500 Subject: Add the user to the cc: on the bug All the logic to add the user to the cc: list on the bug is done in the web page for show_bug.cgi and not on the client side, so the option "Automatically add me to the CC list of bugs I change" in the user's preferences is not honored. Since that preference defaults to Always and users will very typically want to see further traffic on their patches, just always request the user to be added to the Cc. The main downside to this is that we do another round trip to the server when creating and attachment, and also potentially create more bug mail. https://bugzilla.gnome.org/show_bug.cgi?id=663800 --- git-bz | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/git-bz b/git-bz index 8bbd153..d5d98cb 100755 --- a/git-bz +++ b/git-bz @@ -1629,6 +1629,8 @@ def do_attach(*args): if global_options.add_url: add_url(bug, commits) + # as in edit_bug we need to update the bug first while our token is still valid + bug.update(addselfcc='1') attach_commits(bug, commits, edit_comments=global_options.edit) # Sort the patches in the bug into categories based on a set of Git @@ -1793,8 +1795,8 @@ def edit_bug(bug, applied_commits=None, fix_commits=None): # token hash for the bug, since they'll change it. But each attachment # has an individual token hash for just that attachment, so we can # do the attachment updates afterwards. - if len(bug_changes) > 0: - bug.update(**bug_changes) + bug_changes['addselfcc'] = '1' + bug.update(**bug_changes) for (attachment_id, status) in changed_attachments.iteritems(): patch = None -- cgit v1.2.3