Skip to Content
Mercurial: The Definitive Guide
book

Mercurial: The Definitive Guide

by Bryan O'Sullivan
June 2009
Beginner to intermediate
284 pages
8h 14m
English
O'Reilly Media, Inc.
Content preview from Mercurial: The Definitive Guide

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 ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

Version Control with Subversion, 2nd Edition

Version Control with Subversion, 2nd Edition

C. Michael Pilato, Ben Collins-Sussman, Brian W. Fitzpatrick
HTTP/2 in Action

HTTP/2 in Action

Barry Pollard

Publisher Resources

ISBN: 9780596804756Errata Page