Let patch.export handle any fp-like object
authorBrendan Cully <brendan@kublai.com>
Thu, 01 Mar 2007 20:53:38 -0800
changeset 4124 ef4c1cd6f4e4
parent 4123 00923fbce248
child 4125 ef7c39ae5d4c
Let patch.export handle any fp-like object
mercurial/patch.py
--- a/mercurial/patch.py	Thu Mar 01 22:15:56 2007 +0100
+++ b/mercurial/patch.py	Thu Mar 01 20:53:38 2007 -0800
@@ -610,7 +610,7 @@
         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")