# HG changeset patch # User Ludovic Chabant <ludo...@chabant.com> # Date 1549173509 28800 # Sat Feb 02 21:58:29 2019 -0800 # Node ID 75d87a5ac4d0d26e02d21df87d2a89ac59c6d535 # Parent b08ea934c2d5ac097b171ca74e826e4f9dea86a9 extdiff: don't run gui programs when in a cli-only environment
diff --git a/hgext/extdiff.py b/hgext/extdiff.py --- a/hgext/extdiff.py +++ b/hgext/extdiff.py @@ -547,6 +547,9 @@ self._isgui = isgui def __call__(self, ui, repo, *pats, **opts): + if self._isgui and not procutil.gui(): + msg = (_("tool '%s' requires a GUI") % self._cmd) + raise error.Abort(msg) opts = pycompat.byteskwargs(opts) options = ' '.join(map(procutil.shellquote, opts['option'])) if options: _______________________________________________ Mercurial-devel mailing list Mercurial-devel@mercurial-scm.org https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel