[PATCH 1 of 9 py3] ui: check for --debugger in sys.argv using r-string to avoid bytes on py3
Yuya Nishihara
yuya at tcha.org
Sun Mar 12 13:45:35 EDT 2017
On Sun, 12 Mar 2017 13:22:10 -0400, Augie Fackler wrote:
> # HG changeset patch
> # User Augie Fackler <augie at google.com>
> # Date 1489283469 18000
> # Sat Mar 11 20:51:09 2017 -0500
> # Node ID 66618e51771e519582cbe0fe7cd5e116d9cd87ad
> # Parent 1c3352d7eaf24533ad52d4b8a024211e9189fb0b
> ui: check for --debugger in sys.argv using r-string to avoid bytes on py3
>
> Our source loader was errantly turning this --debugger into a bytes,
> which was then causing me to still get a pager when I was using the
> debugger on py3. That made life hard.
>
> diff --git a/mercurial/ui.py b/mercurial/ui.py
> --- a/mercurial/ui.py
> +++ b/mercurial/ui.py
> @@ -901,7 +901,7 @@ class ui(object):
> or not self.formatted()
> or self.plain()
> # TODO: expose debugger-enabled on the UI object
> - or '--debugger' in sys.argv):
> + or r'--debugger' in sys.argv):
Nit: we can use pycompat.sysargv.
More information about the Mercurial-devel
mailing list