[PATCH 1 of 4] cmdutil: drop deprecated hack to pass file object to makefileobj() (API)
Yuya Nishihara
yuya at tcha.org
Mon May 29 14:30:48 UTC 2017
# HG changeset patch
# User Yuya Nishihara <yuya at tcha.org>
# Date 1495715149 -32400
# Thu May 25 21:25:49 2017 +0900
# Node ID f5488f76ec965a9d84d8101fc856c221c63e7ad9
# Parent f54d0838ba7a86c9572cc00dab70a45adc49fa24
cmdutil: drop deprecated hack to pass file object to makefileobj() (API)
All callers pass a string 'pat' or None.
diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -641,10 +641,6 @@ def makefileobj(repo, pat, node=None, de
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)
More information about the Mercurial-devel
mailing list