export: only close files which export itself has opened

This commit is contained in:
Waqas Hussain 2011-02-23 13:21:55 +05:00
parent 52f3c93dfa
commit 9981e2f9a8

View File

@ -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)