Mercurial > hg
changeset 14639:e59a7b8f521a
commands: use ui descriptors when reading/writing from stdin/out
author | Idan Kamara <idankk86@gmail.com> |
---|---|
date | Wed, 08 Jun 2011 14:54:52 +0300 |
parents | 1bdbca0b6604 |
children | 406b6d7bdcb9 |
files | mercurial/commands.py |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/commands.py Wed Jun 15 23:50:33 2011 +0300 +++ b/mercurial/commands.py Wed Jun 08 14:54:52 2011 +0300 @@ -8,7 +8,7 @@ from node import hex, bin, nullid, nullrev, short from lock import release from i18n import _, gettext -import os, re, sys, difflib, time, tempfile, errno +import os, re, difflib, time, tempfile, errno import hg, scmutil, util, revlog, extensions, copies, error, bookmarks import patch, help, url, encoding, templatekw, discovery import archival, changegroup, cmdutil, sshserver, hbisect, hgweb, hgweb.server @@ -336,7 +336,7 @@ if dest == '-': if kind == 'files': raise util.Abort(_('cannot archive plain files to stdout')) - dest = sys.stdout + dest = ui.fout if not prefix: prefix = os.path.basename(repo.root) + '-%h' @@ -1232,7 +1232,7 @@ if text is None: ui.status(_("reading DAG from stdin\n")) - text = sys.stdin.read() + text = ui.fin.read() cl = repo.changelog if len(cl) > 0: @@ -3194,7 +3194,7 @@ if pf == '-': ui.status(_("applying patch from stdin\n")) - pf = sys.stdin + pf = ui.fin else: ui.status(_("applying %s\n") % p) pf = url.open(ui, pf)