1

I'm trying to run hg merge on Cygwin, which I've setup to launch DiffMerge on conflicts. Despite this, I get dropped into vimdiff when I merge.

$ hg merge
tool diffmerge requires a GUI
...

This error message was introduced in commit 090b1a665901, and defines a GUI-enabled device as a nt (Windows) or mac (OSX) machine, or one with the DISPLAY variable set. In my Cygwin install, DISPLAY is not set, and os.name is posix.

$ [ -z "$DISPLAY" ] && echo NOT SET
NOT SET
$ python -c 'import os; print(os.name)'
posix

If I set DISPLAY to an arbitrary string, hg merge successfully launches DiffMerge:

$ DISPLAY=abc hg merge
merging path/to/file
(no more unresolved files)

What am I missing? Is Python incorrectly reporting I'm running on posix? Should Cygwin be setting DISPLAY?

I'm using Cygwin 2.0.4 on Windows 7, Mercurial version 3.3, DiffMerge 4.2.0.

dimo414
  • 47,227
  • 18
  • 148
  • 244
  • Mercurial under Cygwin?! **The Bad Idea (tm)** – Lazy Badger Oct 27 '15 at 07:55
  • 1
    Cygwin might want to define a display variable. And as you found out, it works if you set one. Remains the question why you use mercurial under cygwin while it runs natively under windows without this overhead – planetmaker Oct 27 '15 at 08:46
  • @planetmaker I don't see how that is the question at all. – dimo414 Oct 27 '15 at 11:59
  • @LazyBadger care to elaborate? I've never had any problems with it before, and this has worked previously. – dimo414 Oct 27 '15 at 11:59
  • 1
    seamlessly... Use **native Mercurial** with **native DiffMerge** with **native integration** (`extdiff` for shell-script is hard perversion). Cygwin now is "running on the rake, which are scattered in very strangest places" – Lazy Badger Oct 27 '15 at 15:10
  • I'm not sure I'm even able to parse that comment. What are you quoting from? Why is `extdiff` perverse? Why is the Cygwin setup, provided directly by DiffMerge, undesirable? – dimo414 Oct 27 '15 at 16:39

0 Answers0