--- a/mercurial/cmdutil.py Sun Dec 13 20:01:11 2015 +0900
+++ b/mercurial/cmdutil.py Sun Dec 13 20:07:19 2015 +0900
@@ -462,12 +462,7 @@
fp = repo.ui.fout
else:
fp = repo.ui.fin
- if util.safehasattr(fp, 'fileno'):
- return os.fdopen(os.dup(fp.fileno()), mode)
- else:
- # if this fp can't be duped properly, return
- # a dummy object that can be closed
- return _unclosablefile(fp)
+ return _unclosablefile(fp)
if util.safehasattr(pat, 'write') and writable:
return pat
if util.safehasattr(pat, 'read') and 'r' in mode: