1

I have spent quite a bit of time looking for pointers or ways to set this up. I've used git at my previous job and my new job is using fossil. I'm a novice vim/vimdiff user and would like to keep using it as my daily driver.

I'm having a hard time figuring out how to setup vimdiff as my merge tool. Essentially I need to setup my gmerge-command to use vim diff. I found this:

https://www.fossil-scm.org/xfer/help?cmd=gmerge-command

But not sure how to proceed with vimdiff. I found a ton of help to do this with git but nothing to setup with fossil. Has anyone used vimdiff as the mergetool for fossil?

Thank you!!!

vw999
  • 63
  • 1
  • 4

1 Answers1

3

I haven't (using KDiff3, personally). But if you know what command line to use with Git, then you should be using the same commands with fossil.

Keep in mind that Fossil has two separate settings, gdiff-command and gmerge-command.

The gdiff-command is executed whenever you run the fossil gdiff command. The gmerge-command command is executed whenever Fossil needs to perform a merge (e.g. when it encounters a conflict during a merge operation). It will replace the placeholders (indicated on the documentation page you referred to) %baseline, %original, %merge and %output by the relevant file names.

If vimdiff is capable of performing a three-way merge, it should be possible to specify those file names as well.

Looking at these instructions for using Vim to perform merges in Mercurial, I'd suggest you simply try setting your gmerge-command to vim -d "%baseline" "%original" "%merge" "%output" +close +close.

Martijn
  • 13,225
  • 3
  • 48
  • 58