Show More
@@ -36,6 +36,8 b' def _picktool(repo, ui, path, binary, sy' | |||||
36 | ui.warn(_("tool %s can't handle symlinks\n") % tmsg) |
|
36 | ui.warn(_("tool %s can't handle symlinks\n") % tmsg) | |
37 | elif binary and not _toolbool(ui, tool, "binary"): |
|
37 | elif binary and not _toolbool(ui, tool, "binary"): | |
38 | ui.warn(_("tool %s can't handle binary\n") % tmsg) |
|
38 | ui.warn(_("tool %s can't handle binary\n") % tmsg) | |
|
39 | elif not util.gui() and _toolbool(ui, tool, "gui"): | |||
|
40 | ui.warn(_("tool %s requires a GUI\n") % tmsg) | |||
39 | else: |
|
41 | else: | |
40 | return True |
|
42 | return True | |
41 | return False |
|
43 | return False |
@@ -895,6 +895,10 b' def splitpath(path):' | |||||
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 |
General Comments 0
You need to be logged in to leave comments.
Login now