changeset 13467:31aa2e5b0750 stable

export: only close files which export itself has opened
author Waqas Hussain <waqas20@gmail.com>
date Wed, 23 Feb 2011 13:21:55 +0500
parents f2295f7cd468
children d100702326d5
files mercurial/cmdutil.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/cmdutil.py	Wed Feb 23 10:59:36 2011 -0500
+++ b/mercurial/cmdutil.py	Wed Feb 23 13:21:55 2011 +0500
@@ -681,9 +681,10 @@
 
         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)