[PATCH] cmdutil: use isstdiofilename() where appropriate
Yuya Nishihara
yuya at tcha.org
Thu Jun 1 14:37:34 UTC 2017
# 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
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())
More information about the Mercurial-devel
mailing list