# HG changeset patch # User Brendan Cully # Date 1172811218 28800 # Node ID ef4c1cd6f4e49f5d18831f33d456e562a7070dcf # Parent 00923fbce248b62a75b7634cd784c7170f104399 Let patch.export handle any fp-like object diff --git a/mercurial/patch.py b/mercurial/patch.py --- a/mercurial/patch.py +++ b/mercurial/patch.py @@ -610,7 +610,7 @@ def export(repo, revs, template='hg-%h.p 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")