2

I have not found a good way to use ediff with Mercurial changsets. What I want is basically the functionality of vc-dir, but for committed changesets. The input should be a changeset identifier, and I want an overview of the changed files, and an easy way to invoke ediff on each file.

I have experimented with using a wrapper around ediff-directories as argument to hg extdiff but I don't get the overview for the changed files to work.

I use mq, but I don't think that should be an issue, as applied patches as far as I can tell are treated as other changesets.

1

I am not sure whether this is exactly what you ask for, but...

  1. M-x monky-log, find appropriate changeset, click Enter

    (monky is a magit clone, fairly nice, give it a try if you haven't tried it)

  2. M-x xhg-log, move to appropriate changeset, and press =

    (xhg is another sensible mercurial mode for emacs)

  3. M-x ahg-diff (will prompt for revisions and display diff in diff mode)

    (ahg is yet another mercurial module)

All those modules may have more functionality of a kind, I haven't really explored (while I heavily commit from emacs and frequently review recent logs, for deeper complicated history analysis I prefer hgview or TortoiseHg).


Update (after reading comment)

This will require some work to polish, but the effect need not be that far:

a) In this fancier log of monky, try tapping Tab, n, Tab, n, ... a few times. This should hide diffs and leave only file changes info. I suppose this is the summary buffer you want. So you only need to trick monky to open log in compacted view by default (advising sth. to set monky-hide-diffs variable to 't before this buffer is populated will likely help)

b) xhg has xhg-ediff-file-at-rev, unfortunately not bound to anything. So harder part of the exercise is to extract current file name and revision from monky-commit buffer and call xhg-ediff-file-at-rev with those data (my first instinct would be to advise monky-refresh-commit-buffer to set some variable to current commit, but maybe extracting info from actual buffer would be simpler).

Not a true solution, but ....

  • Pressing return on a change set in monky-log basically yields a fancier variant of log-view-diff-changeset (unless I've missed something). It looks nice, but it was the ediff functionality I was after. This still shows the text diffs, and from the descriptions I'm guessing the others do too? – Meaningful Username Mar 3 '15 at 15:55
  • FWIW If you've seen and like the ediff features in magit, you could look for / raise a feature request for monky to port the magit-ediff.el library? (I would think that working to such functionality into monky for everyone would be the most valuable approach.) – phils Nov 28 '15 at 23:11
0

install latest find-file-in-project

M-x ffip-show-diff-by-description, but the output is in ffip-diff-mode instead of ediff-mode.

You can also setup ffip-diff-backends.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.