mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 00:14:35 +03:00
Let patch.export handle any fp-like object
This commit is contained in:
parent
05d497adec
commit
507ce565c1
@ -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")
|
||||
|
Loading…
Reference in New Issue
Block a user