Merge Diff Extension

David Wolever wolever.lists at gmail.com
Mon Mar 12 13:09:17 CDT 2012


(please forgive the lack of in-reply-to headers)

Hey,
Author of mergediff here. Na'Tosha pointed me to this thread, and I'd like to put in my $0.02.

tl;dr: mergediff is definitely buggy and as it stands, and not ready for inclusion in the hg core. I don't believe these bugs are insurmountable, I just haven't had the motivation to fix them yet (it works Well Enough for me, haven't had much outside interest).

Also: I'm at PyCon, and would be very happy to get together in meatspace to talk about the below. If "you" are here, let me know!

In no particular order, responses to various points that have been discussed:

== Inclusion in hg core
It is my opinion that mergediff is currently too buggy to be considered for inclusion in core.

mergediff's relatively naive implementation[0] leads to a few issues: https://bitbucket.org/wolever/hg-mergediff/issues?status=new&status=open

I believe that it would be possible to fix these, but I'm not sure I know enough about Mercurial internals to do it.

[0]: specifically, the way it operates directly on the hunks returned by `hg diff`

== Compatibility with git's combined diff format
Definitely something I considered.
This can be broken down into header compatibility and body compatibility.

I didn't attempt header compatibility because, frankly, I don't understand the combined diff header (ex, I'm not sure what the hashes in `index <hash>,<hash>..<hash>` represent).

I believe that the body of a mergediff should be *syntactically* compatible with a git combined diff.

It's important to note, though, that a mergediff is *semantically* incompatible with a combined diff: a combined diff will show *all* the changes necessary to recreate the merge, while a mergediff *explicitly hides* changes.






More information about the Mercurial-devel mailing list