Patch management between repositories, part 2

Back in 2008, I said the following:

I’m hoping a few people can point me to some nice freebie tools for applying patches in one repository to another repo’s code, and keeping the patches up to date. Or for handling cross-repository (and for that matter, cross-repository-platform) patches in general.

And…

From my brief research, Mercurial Queues seems perfect for this – within Mercurial repositories anyway.

Two years later, I’ve long since stopped caring about CVS. Both Verbosio (my experimental XML editor project) and Mozilla host their source code on Mercurial, and I’m getting better at Python. So I’ve once again solved my own problem.

The funny thing is that Mercurial Queues is both simple enough and documented enough for me to put this together. I mean, it was really only a day’s work to figure out. Once I found out .hg/patches was its own Mercurial repository, writing code to manipulate that inner repository was a piece of cake.

Whoever developed Mercurial Queues was very, very clever. Clever enough to make the basic design hackable. I like that.