Patchwork ui: use self._isatty() for consistency

login
register
mail settings
Submitter Yuya Nishihara
Date Oct. 9, 2014, 3:42 p.m.
Message ID <e4b2beb54fbd39980b3d.1412869348@mimosa>
Download mbox | patch
Permalink /patch/6166/
State Accepted
Headers show

Comments

Yuya Nishihara - Oct. 9, 2014, 3:42 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1412767116 -32400
#      Wed Oct 08 20:18:36 2014 +0900
# Node ID e4b2beb54fbd39980b3dd7c5a263fd74d18d9b33
# Parent  a1eb21f5caea4366310e32aa85248791d5bbfa0c
ui: use self._isatty() for consistency
Augie Fackler - Oct. 9, 2014, 6:54 p.m.
On Fri, Oct 10, 2014 at 12:42:28AM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1412767116 -32400
> #      Wed Oct 08 20:18:36 2014 +0900
> # Node ID e4b2beb54fbd39980b3dd7c5a263fd74d18d9b33
> # Parent  a1eb21f5caea4366310e32aa85248791d5bbfa0c
> ui: use self._isatty() for consistency

looks good, queued

>
> diff --git a/mercurial/ui.py b/mercurial/ui.py
> --- a/mercurial/ui.py
> +++ b/mercurial/ui.py
> @@ -684,7 +684,7 @@ class ui(object):
>                  r = default
>              # sometimes self.interactive disagrees with isatty,
>              # show response provided on stdin when simulating
> -            if not util.isatty(self.fin):
> +            if not self._isatty(self.fin):
>                  self.write(r, "\n")
>              return r
>          except EOFError:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel

Patch

diff --git a/mercurial/ui.py b/mercurial/ui.py
--- a/mercurial/ui.py
+++ b/mercurial/ui.py
@@ -684,7 +684,7 @@  class ui(object):
                 r = default
             # sometimes self.interactive disagrees with isatty,
             # show response provided on stdin when simulating
-            if not util.isatty(self.fin):
+            if not self._isatty(self.fin):
                 self.write(r, "\n")
             return r
         except EOFError: