mercurial/cmdutil.py
changeset 32538 2dd8d4108249
parent 32528 9f56d462634c
child 32539 447bbd970047
--- a/mercurial/cmdutil.py	Mon May 29 21:57:51 2017 +0900
+++ b/mercurial/cmdutil.py	Thu May 25 21:25:49 2017 +0900
@@ -641,10 +641,6 @@
         else:
             fp = repo.ui.fin
         return _unclosablefile(fp)
-    if util.safehasattr(pat, 'write') and writable:
-        return pat
-    if util.safehasattr(pat, 'read') and 'r' in mode:
-        return pat
     fn = makefilename(repo, pat, node, desc, total, seqno, revwidth, pathname)
     if modemap is not None:
         mode = modemap.get(fn, mode)