From: Don Armstrong <don@donarmstrong.com>
Date: Fri, 12 Feb 2016 21:01:03 +0000 (-0800)
Subject: cloning had the blocking reversed
X-Git-Tag: release/2.6.0~214
X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=3eea543e26156ad2c5253f09f1b35d9554297386;p=debbugs.git

cloning had the blocking reversed

Bugs which were cloned had the block/blockedby sense reversed. This has
now been cleaned up.
---

diff --git a/Debbugs/Control.pm b/Debbugs/Control.pm
index 44d0062e..0878bda5 100644
--- a/Debbugs/Control.pm
+++ b/Debbugs/Control.pm
@@ -2963,19 +2963,19 @@ sub clone_bug {
     # bugs that this bug is blocking are also blocked by the new clone(s)
     for my $bug (split ' ', $data->{blocks}) {
 	for my $new_bug (@new_bugs) {
-	    set_blocks(bug => $new_bug,
-		       block => $bug,
+	    set_blocks(bug => $bug,
+                   block => $new_bug,
 		       hash_slice(%param,
 				  keys %common_options,
 				  keys %append_action_options),
 		      );
 	}
     }
-    # bugs that this bug is blocked by are also blocking the new clone(s)
+    # bugs that are blocking this bug are also blocking the new clone(s)
     for my $bug (split ' ', $data->{blockedby}) {
 	for my $new_bug (@new_bugs) {
-	    set_blocks(bug => $bug,
-		       block => $new_bug,
+	    set_blocks(bug => $new_bug,
+                   block => $bug,
 		       hash_slice(%param,
 				  keys %common_options,
 				  keys %append_action_options),