[PATCH] export: only close files which export itself has opened
Waqas Hussain
waqas20 at gmail.com
Wed Feb 23 02:30:25 CST 2011
# HG changeset patch
# User Waqas Hussain <waqas20 at gmail.com>
# Date 1298449315 -18000
# Branch stable
# Node ID 90cc203ee41d5eeeb884e39fbf20c148db9e1b16
# Parent 22f948c027a97e640ae74021dfdfd8014717705d
export: only close files which export itself has opened
diff -r 22f948c027a9 -r 90cc203ee41d mercurial/cmdutil.py
--- a/mercurial/cmdutil.py Wed Feb 23 00:25:18 2011 +0100
+++ 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)
More information about the Mercurial-devel
mailing list