mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
export: only close files which export itself has opened
This commit is contained in:
parent
52f3c93dfa
commit
9981e2f9a8
@ -681,9 +681,10 @@ def export(repo, revs, template='hg-%h.patch', fp=None, switch_parent=False,
|
||||
|
||||
shouldclose = False
|
||||
if not fp:
|
||||
shouldclose = True
|
||||
fp = make_file(repo, template, node, total=total, seqno=seqno,
|
||||
revwidth=revwidth, mode='ab')
|
||||
if fp != template:
|
||||
shouldclose = True
|
||||
if fp != sys.stdout and hasattr(fp, 'name'):
|
||||
repo.ui.note("%s\n" % fp.name)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user