mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 23:38:50 +03:00
cmdutil: use ui descriptors in makefileobj
This commit is contained in:
parent
1a9dd17406
commit
936b803233
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user