Mercurial > public > mercurial-scm > hg
comparison mercurial/util.py @ 6007:090b1a665901
filemerge: add config item for GUI tools
<tool>.gui indicates whether a tool requires a GUI to run
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Sun, 03 Feb 2008 19:29:05 -0600 |
parents | 3c9dbb743d20 |
children | 3c3b126e5619 |
comparison
equal
deleted
inserted
replaced
6006:3c9dbb743d20 | 6007:090b1a665901 |
---|---|
893 an alternative of simple "xxx.split(os.sep)". | 893 an alternative of simple "xxx.split(os.sep)". |
894 It is recommended to use os.path.normpath() before using this | 894 It is recommended to use os.path.normpath() before using this |
895 function if need.''' | 895 function if need.''' |
896 return path.split(os.sep) | 896 return path.split(os.sep) |
897 | 897 |
898 def gui(): | |
899 '''Are we running in a GUI?''' | |
900 return os.name == "nt" or os.name == "mac" or os.environ.get("DISPLAY") | |
901 | |
898 # Platform specific variants | 902 # Platform specific variants |
899 if os.name == 'nt': | 903 if os.name == 'nt': |
900 import msvcrt | 904 import msvcrt |
901 nulldev = 'NUL:' | 905 nulldev = 'NUL:' |
902 | 906 |