problem with extdiff extension

Matt Mackall mpm at selenic.com
Tue Aug 23 21:54:56 UTC 2011


On Tue, 2011-08-23 at 23:22 +0200, Mads Kiilerich wrote:
> Matt Mackall wrote, On 08/23/2011 11:12 PM:
> > On Tue, 2011-08-23 at 00:14 -0700, James Walker wrote:
> >> On 8/22/11 10:33 AM, Mads Kiilerich wrote:
> >>> Anyway, feel free to file it in the bugtracker - with an example of how
> >>> it can be reproduced.
> >>
> >> Maybe it's more of a feature request, that Mercurial do a better job of
> >> tracking files through moves and renames.
> > It does a fine job. But generally speaking, there's no way to
> > communicate that information to a third-party diff tool.
> 
> True, but it could make a content diff in the special and useful case 
> where there is only one (copied/renamed) file involved - assuming the 
> right option is specified.

That's quite tricky from a UI perspective.

We've currently got:

hg diff            <- diff all files against parent of working directory
hg diff -r x       <- diff working directory against x
hg diff -r x -r y  <- diff revisions x and y
hg diff A...     <- diff one or more files against files of the same
name in parent
hg diff -r x A...
hg diff -r x -r y A...

So what's missing is (at least!) the following possibilities:

1) find where A was copied from in parent and diff
2) find where A was copied from in rev x and diff
3) find where A at x was copied from in rev y and diff
4) all of the above but following renames in the other direction
5) diff arbitrary file revisions A at x and B at y

Now we've got some issues here:

- these diffs will only make sense for comparing exactly two file
revisions, not groups of files
- case (1) may have more than one answer due to merges so are already
poorly defined
- in case (2) we can accumulate -lots- of possible sources
- similarly, in case (4) we can have an arbitrary number of copies
- people ask for (5) a fair amount

So the challenge is to come up with an easy to use syntax that does the
above without breaking current usage. And generically enough that it can
be applied elsewhere. That probably means using filesets, but I'm not
sure how.


-- 
Mathematics is the supreme nostalgia of our time.





More information about the Mercurial mailing list