[PATCH STABLE] procutil: extend gui test to detect wayland session (issue6479)
Raphaël Gomès
raphael.gomes at octobus.net
Thu Feb 4 12:24:20 UTC 2021
Thanks for doing this patch so quickly Yuja. LGTM
On 2/4/21 12:21 PM, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1612436205 -32400
> # Thu Feb 04 19:56:45 2021 +0900
> # Branch stable
> # Node ID 6cc6b8610cec85dc624f4bb6568c2fd16ac018d1
> # Parent 14feaa5792ed116ec8cc8469fc3de976fb4dd8f5
> procutil: extend gui test to detect wayland session (issue6479)
>
> diff --git a/mercurial/utils/procutil.py b/mercurial/utils/procutil.py
> --- a/mercurial/utils/procutil.py
> +++ b/mercurial/utils/procutil.py
> @@ -546,7 +546,11 @@ def _gui():
> # pure build; use a safe default
> return True
> else:
> - return pycompat.iswindows or encoding.environ.get(b"DISPLAY")
> + return (
> + pycompat.iswindows
> + or encoding.environ.get(b"DISPLAY")
> + or encoding.environ.get(b"WAYLAND_DISPLAY")
> + )
>
>
> def gui():
>
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
More information about the Mercurial-devel
mailing list