Mozilla: hg as a collaboration tool

L. David Baron dbaron at dbaron.org
Wed Feb 6 19:20:36 CST 2008


On Wednesday 2008-02-06 18:48 -0600, Oliver X wrote:
> On Wed, 2008-02-06 at 16:05 -0800, L. David Baron wrote:
> > On Wednesday 2008-02-06 10:16 +0000, Dirkjan Ochtman wrote:
> > > There's some trouble brewing within Mozilla (mostly the Mobile group, AFAICS)
> > > over the use of hg. I've been tracking this for a few days, but haven't yet been
> > > able to get a good grasp of what their problems have been. Today, there's this
> > > post from Brad Lassey about the problems. It would probably be good if we could
> > > see what their problems are and what we can do to make things easier.
> > > 
> > > http://blog.mozilla.com/blassey/2008/02/05/hg-as-a-colaboration-tool/
> > 
> > There's some more info at:
> > http://blog.mozilla.com/jorendorff/2008/02/06/mercurial-and-other-monsters/
> 
> Pfft. It's not C++ vs C, it's C vs BASIC. But there's still no actual
> content in these posts that would allow one to even point someone in the
> right direction.

OK, to quote the relevant part about this incident:

# Brad did some work in a Mercurial repo on Vista, then zipped up
# the whole repo and moved it to a Windows XP VM. This is supposed
# to work just fine. But (and this part, we think, this is due to a
# brilliant top-secret feature of Windows Vista called
# virtualization, a feature so awful the mobile developers have
# resorted to logging in as Administrator all the time) Brad ended
# up with a zip file that had multiple copies of some files.
# Whatever Vista put into that zip, extracting it on XP produced a
# corrupt repository. (Specifically, Mercurial’s working directory
# was at revision X, but it thought it was at revision Y.)

So it seems more like this incident wasn't a problem with Mercurial
itself.


That said, I think jorendorff's other complaints are quite
legitimate.  I have similar ones (but I can't pretend to speak for
him): neither mercurial alone nor mercurial+mq really does what I
want.  The former since most use models for mercurial assume that
clones are cheap (which isn't true when a clone is 1.1 GB and takes
an hour to compile) and mq assumes that touching all the files
touched by all your patches is cheap (when it really can mean an
hour of recompilation; and ccache doesn't help all that much since
preprocessing, and the I/O needed to do it, is a significant part of
compilation).

I'm currently doing most of my work using two clones; one of them
(the only one I ever modify) has an mq queue, and the other (or
potentially more than one, if I need to test on multiple machines)
is cloned *from* the mq queue (creating an additional head each
time) and updated with up -C (which only touches the modified
files).  This makes "fix a compilation error caused by a typo" be a
surprisingly expensive operation (maybe qpop, edit, qrefresh, maybe
qpush -a, pull, up -C), but otherwise suits my needs pretty well.
But I certainly don't think that's how mercurial was designed to be
used.

-David

-- 
L. David Baron                                 http://dbaron.org/
Mozilla Corporation                       http://www.mozilla.com/


More information about the Mercurial mailing list