[PATCH] archive: wrap the ui descriptor so it doesn't get closed
Idan Kamara
idankk86 at gmail.com
Fri Jun 24 11:34:00 CDT 2011
# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1308924277 -10800
# Branch stable
# Node ID db9bf5bec86ff722a5a8f2227d2648839894631e
# Parent 09c863ce243e8da87c445ae396d21e3c034747db
archive: wrap the ui descriptor so it doesn't get closed
archival.tarit closes the fileobj if one is passed to it, which is undesired
when reading from '-'.
diff -r 09c863ce243e -r db9bf5bec86f mercurial/commands.py
--- a/mercurial/commands.py Fri Jun 24 17:04:37 2011 +0300
+++ b/mercurial/commands.py Fri Jun 24 17:04:37 2011 +0300
@@ -337,7 +337,7 @@
if dest == '-':
if kind == 'files':
raise util.Abort(_('cannot archive plain files to stdout'))
- dest = ui.fout
+ dest = cmdutil.makefileobj(repo, dest)
if not prefix:
prefix = os.path.basename(repo.root) + '-%h'
More information about the Mercurial-devel
mailing list