Mozilla: hg as a collaboration tool

Jason Orendorff jason.orendorff at gmail.com
Tue Feb 12 07:01:02 CST 2008


On Feb 6, 2008 7:07 PM, Dustin Sallings <dustin at spy.net> wrote:
>  Guy 2 comes around and talks about how mercurial is too complicated, nobody
> understands it, and all these people rushing in talking about how it's
> actually easy are just making things worse.

I didn't exactly say Mercurial is too complicated.  I said it's "more
flexible and more complex" than CVS.  Does anyone disagree?

Mercurial seems so simple.  Last week the question came up on IRC,
"How do I get a patch containing just the changes I've made in my
repo?"  The best answer came from dbaron:

  <dbaron> Think of it like diffing the changes on a cvs branch.
      You want to diff the base and the tip of the branch.
  <dbaron> If you've merged the branch to a new base, you need to
      diff against that.

So the answer is: look at "hg log" and find your most recent merge
from trunk.  Then "hg diff -r <trunk-parent-of-that-merge>".  If you
type "hg diff -r <that-merge>", you get a plausible but incorrect
patch.  If you just do "hg diff -r tip", you get a different incorrect
patch.

With CVS, the answer is "cvs diff".

Now, it is possible to use hg just like you would use CVS.  Then you
could just "hg diff".  But everyone will tell you not to do that.
This guy is using hg as designed.  As a result, this basic operation
is harder for him than it would be with CVS.

-j


More information about the Mercurial mailing list