cmdutil: use ui descriptors in makefileobj

This commit is contained in:
Idan Kamara 2011-06-08 14:54:52 +03:00
parent 1a9dd17406
commit 936b803233

View File

@ -160,7 +160,7 @@ def makefileobj(repo, pat, node=None, total=None,
writable = mode not in ('r', 'rb')
if not pat or pat == '-':
fp = writable and sys.stdout or sys.stdin
fp = writable and repo.ui.fout or repo.ui.fin
return os.fdopen(os.dup(fp.fileno()), mode)
if hasattr(pat, 'write') and writable:
return pat