From 507ce565c17bbfc86e9d80373989b92f1aea3997 Mon Sep 17 00:00:00 2001 From: Brendan Cully Date: Thu, 1 Mar 2007 20:53:38 -0800 Subject: [PATCH] Let patch.export handle any fp-like object --- mercurial/patch.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mercurial/patch.py b/mercurial/patch.py index b15d21db2c..0e2024de81 100644 --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -610,7 +610,7 @@ def export(repo, revs, template='hg-%h.patch', fp=None, switch_parent=False, if not fp: fp = cmdutil.make_file(repo, template, node, total=total, seqno=seqno, revwidth=revwidth) - if fp not in (sys.stdout, repo.ui): + if hasattr(fp, 'name'): repo.ui.note("%s\n" % fp.name) fp.write("# HG changeset patch\n")