views:

600

answers:

3

I use mercurial and I want to see modified change in Vim or GVim. Normally there is hg diff which show the modified changes in diff format. but I want to see it in Vim as the original version and modified version side-by-side.

I try extdiff in http://mercurial.selenic.com/wiki/ExtdiffExtension but it doesn't work and gvim open some blank file.

I know there is gvim -d localfile otherfile but I don't know how to config mercurial.

A: 

I can't help you for the vim part, but in mercurial, to get the content of a file in the parent changest, you'll do hg cat path/to/my/file.ext

Jerome
A: 

Check this: Using vimdiff to view single diffs

rcs
+2  A: 

If you're fine with vim, I'm been using this in my ~/.hgrc for months without problems

[extensions]
hgext.extdiff =

[extdiff]
cmd.vimdiff =

[alias]
vi  = vimdiff
vim = vimdiff

Then you just use

hg vimdiff somefile

The [alias] section is optional, but it's nice to have.

I'm using v1.4.2, FWIW.

Permanuno