# HG changeset patch # User Brendan Cully # Date 1172811218 28800 # Node ID ef4c1cd6f4e49f5d18831f33d456e562a7070dcf # Parent 00923fbce248b62a75b7634cd784c7170f104399 Let patch.export handle any fp-like object diff -r 00923fbce248 -r ef4c1cd6f4e4 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")