]> git.donarmstrong.com Git - don.git/blob - posts/debbugs_forcemerge.mdwn
calendar update
[don.git] / posts / debbugs_forcemerge.mdwn
1 [[!meta title="Debbugs forcemerge support"]] 
2
3
4 One of the earliest features I wrote for the Debian bug tracking
5 system (Debbugs) after joining the team was support for forcibly
6 merging bugs. Originally, merging two bugs required that the bugs be
7 in exactly the same state before merging them; `forcemerge` removed
8 this requirement.
9
10 Unfortunately, the way I originally implemented this was shortsighted,
11 and merely forced the merge partners to have the same values as the
12 merge master. This meant that owners, blocking bugs, and many other
13 things were silently changed, which meant that people weren't notified
14 of changes, and bugs could end up in an inconsistent state.
15
16 A while ago, I decided to fix this by calculating the changes required
17 to actually merge the bugs, making those changes, and then merging the
18 bugs normally; thus, doing everything that a maintainer would normally
19 have done for them. This necessitated abstracting out the entire
20 control apparatus into the `Debbugs::Control` module.
21
22 Now that it's complete, you can do the following:
23
24     > forcemerge 1 2
25     Bug #1 [foo] new title
26     Bug #2 {Done: foo@bugs.something} [foo] foo
27     Unset bug forwarded-to-address
28     Severity set to 'wishlist' from 'grave'
29     3 was blocked by: 2
30     3 was not blocking any bugs.
31     Removed blocking bug(s) of 3: 2
32     2 was blocked by: 4
33     2 was not blocking any bugs.
34     Removed blocking bug(s) of 2: 4
35     Bug reopened
36     Removed annotation that bug was owned by bar@baz.com.
37     
38     Removed indication that 2 affects bleargh
39     Removed tag(s) unreproducible and moreinfo.
40     Merged 1 2
41     > thanks
42     Stopping processing here.
43
44 and bug 2 now is merged with 1 and matches the state of 1.
45 [The above is the control output from the appropriate bit of the `06_mail_handling.t` test.]
46
47 This change also means that I'll be able to finally write support for
48 control@ operations at submit@ time. Also, all of the bug
49 modifications that happen at submit@ or nnn@ time (setting title,
50 found, etc.) will be implemented as calls to Debbugs::Control so we
51 can eventually keep a postgresql database updated in addition to the
52 flatfile database.
53
54 [[!tag debian tech debbugs]]