120
edits
(Add Mercurial Queues intro) |
|||
Line 219: | Line 219: | ||
Bugs which are fixed in tracemonkey are marked as 'fixed-in-tracemonkey' on the bugzilla whiteboard for the bug. When sayrer merges the code into mozilla-central, those bugs are marked as fixed. | Bugs which are fixed in tracemonkey are marked as 'fixed-in-tracemonkey' on the bugzilla whiteboard for the bug. When sayrer merges the code into mozilla-central, those bugs are marked as fixed. | ||
=== MQ === | === Mercurial Queues === | ||
Since most of our lives revolve around patches, and we use Mercurial, nearly everybody uses Mercurial queues. | |||
Queues are based on the idea of patch management. Each queue consists of a series of patches, applied sequentially. The aim of the game is to split potential commits into simple, bite-sized chunks which are easy to review. This also makes it simple to experiment without polluting your existing work on a bug, to spin parts off into new bugs, and to rapidly apply and unapply patches (as demonstrated in the tutorial above). | |||
==== Enabling ==== | |||
Add the following snippet to your .hgrc file to enable MQ | |||
[extensions] | |||
mq = | |||
==== Example MQ workflow ==== | |||
Clone the repository to deal with a bug | |||
hg clone http://hg.mozilla.org/tracemonkey | |||
Initialize your queue | |||
hg qinit -c | |||
Create a new patch, with some name. | |||
hg qnew first_attempt | |||
Work on the patch, try to fix the bug, test, compile, etc. | |||
Refresh (save your work into the patch) | |||
hg qrefresh | |||
Repeat a few times. | |||
Rename the patch (because your first name wasn't appliable) | |||
hg qrename refactor_the_whatsit | |||
Create a new patch to try a logically separate part of the same bug. | |||
hg qnew rip_out_the_old_thing | |||
Repeat the process a few times, until you have solved the problem. During this time, it can often be useful to go back and forth between patches: | |||
hg qpop # unapply a patch | |||
hg qpush # reapply a patch | |||
hg qpop -a # unapply all patches | |||
hg qpush -a # reapply all patches | |||
Combine all the patches into a single patch, which you submit to bugzilla. | |||
hg qpush -a | |||
hg qdiff --rev qparent:. > my_wonderful_patch.patch | |||
Commit the patches to your local patch repository, in case you make a mistake. (You might do this periodically.) | |||
hg qcommit -m "Some message. Doesn't have to be good, this won't be committed to the repository, it's jut for you" | |||
Go back to the old patches and fiddle with them based on feedback. | |||
hg qpop | |||
hg qrefresh | |||
etc | |||
- Overview | - Overview | ||
- sharing | - sharing | ||
- hgrc file | - hgrc file | ||
- useful plugins | - useful plugins | ||
- patch policy | - patch policy |
edits