Advantages of MQ over vanilla hg

Shane Holloway shane.holloway at ieee.org
Sun Mar 11 15:12:02 CDT 2007


There is another use people have used quilt and Mercurial's mq  
extension to help solve.  The basics are to replace all those nasty  
#ifdef preprocessor blocks of code for various special cases to  
address different compilers, platforms, extensions, and more.  The  
basic idea is that you maintain a patch-quilt that addresses those  
changes, using patch guards to replace the #ifdef selection identifiers.

What this case turns out to be, when boiled down, is you are hosting  
the "upstream" codebase in hg, as well as many "downstream" codebases  
to tailor the code to address specifics that complicate, obfuscate,  
and otherwise interfere with the upstream.  The upside would appear  
to be an easier line of code to follow without all of the conditional  
code, but the downside would be that not all of the code is visible.   
Also, to use the approach in practice, you would need to assure that  
both the upstream codebase, and the various quilt-sets were tested on  
a regular basis to make sure the patches do not become stale.

Just another thought for you to mix in,
-Shane Holloway

On Mar 11, 2007, at 4:23 AM, Ben Hood wrote:

> Hi all,
>
> I've been googling usage scenarios of MQ to try find out what the
> advantage is over just using vanilla hg.
>
> Given my limited knowledge, one of the best explanations I found was
> Neuron's upstream mutt CVS example
> (http://blogs.sun.com/neuron/entry/first_look_mercurial).
>
> I am correct in assuming that MQ is essentially useful when you have
> to manage a derived tree and still incorporate changes from the
> upstream tree over time?
>
> Put it another way, if you didn't have an upstream tree (i.e. you are
> just maintaining your own isolated tree and whatever other people
> choose to do with that downstream is irrelevant), then you wouldn't
> bother with MQ, you would just use vanilla hg?
>
> Basically I'm trying to gauge whether I can get any benefits from MQ
> in the non-upstream case, rather than just using a tool "because you
> can".
>
> Thanks,
>
> Ben
> _______________________________________________
> Mercurial mailing list
> Mercurial at selenic.com
> http://selenic.com/mailman/listinfo/mercurial



More information about the Mercurial mailing list