[PATCH 0 of 2] Better support for diffing individual changesets.

Dirkjan Ochtman dirkjan at ochtman.nl
Thu Oct 9 04:09:47 CDT 2008


Matt Mackall <mpm <at> selenic.com> writes:
> Ok, you've convinced me it's an interesting feature, I'm just not sure I
> like having even more options for diff. It would be nice if we had some
> standard way of referring to "the first parent of changeset x", "the
> ancestor of x and y", etc. and then we'd have more general capability
> everywhere without new options.

Well, diffing against the parent is something of a special case. Subversion
added a -c option for diff after several years, because the benefits of this
simple option far outweighed the costs of spending an option on this. FWIW, I've
wanted this option since I started using Mercurial: being able to use diff
(rather than export, which is useful but has a very different connotation) to
view a revision's changes is pretty fundamental use, and the current way
(figuring out parents, then using diff -r -r) is verbose and cumbersome. This
also came up in discussions with Mozilla people, who wanted it.

BTW, I think the cost of having diff options should be limited somewhat by the
fact that most of the options are copied from GNU diff.

I'm not sure I care much for --switch-parents, we should rather use tonfa's
merge diffs once that's ready, but the basic use of diff against first parent is
exceedingly simple though in my opinion thoroughly useful.

Cheers,

Dirkjan



More information about the Mercurial-devel mailing list