Chapter 13. Advanced Uses of Mercurial Queues
While it’s easy to pick up straightforward uses of Mercurial Queues, the use of a little discipline and some of MQ’s less frequently used capabilities makes it possible to work in complicated development environments.
In this chapter, I will use as an example a technique I have used to manage the development of an Infiniband device driver for the Linux kernel. The driver in question is large (at least as drivers go), with 25,000 lines of code spread across 35 source files. It is maintained by a small team of developers.
While much of the material in this chapter is specific to Linux, the same principles apply to any code base for which you’re not the primary owner, and upon which you need to do a lot of development.
The Problem of Many Targets
The Linux kernel changes rapidly and has never been internally stable; developers frequently make drastic changes between releases. This means that a version of the driver that works well with a particular released version of the kernel will typically not even compile correctly against any other version.
To maintain a driver, we have to keep a number of distinct versions of Linux in mind:
One target is the main Linux kernel development tree. Maintenance of the code is in this case partly shared by other developers in the kernel community, who make “drive-by” modifications to the driver as they develop and refine kernel subsystems.
We also maintain a number of “backports” to older versions of the Linux ...
Get Mercurial: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.