[PATCH] cmdutil: use isstdiofilename() where appropriate

Augie Fackler raf at durin42.com
Thu Jun 1 10:55:30 EDT 2017


On Thu, Jun 01, 2017 at 11:37:34PM +0900, Yuya Nishihara wrote:
> # HG changeset patch
> # User Yuya Nishihara <yuya at tcha.org>
> # Date 1496326103 -32400
> #      Thu Jun 01 23:08:23 2017 +0900
> # Node ID fbc9705beb0eb803e6efd2234fcb1de6ffb358de
> # Parent  ee0119499321b4b1df8e04694d82f6ca425e60df
> cmdutil: use isstdiofilename() where appropriate

Queued, thanks.

>
> diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
> --- a/mercurial/cmdutil.py
> +++ b/mercurial/cmdutil.py
> @@ -493,7 +493,7 @@ def logmessage(ui, opts):
>                             'exclusive'))
>      if not message and logfile:
>          try:
> -            if logfile == '-':
> +            if isstdiofilename(logfile):
>                  message = ui.fin.read()
>              else:
>                  message = '\n'.join(util.readfile(logfile).splitlines())
> _______________________________________________
> 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