mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
334286e6e7
Standard streams are expected to operate in binary mode everywhere, especially with archive, cat, diff and export commands. Rewriting these to separate informational output from binary content is complicated to do and to maintain, nonwithstanding mode switching reliability. Changing all output mode to binary should not have much impact on Windows were stream processing tools are barely used and usually cope with unix style endings. Streams mode being process wide, the switch is performed in the startup script to avoid polluting existing API users who may have solved this issue already or ignored it at least for the mercurial part.
21 lines
537 B
Python
Executable File
21 lines
537 B
Python
Executable File
#!/usr/bin/env python
|
|
#
|
|
# mercurial - scalable distributed SCM
|
|
#
|
|
# Copyright 2005-2007 Matt Mackall <mpm@selenic.com>
|
|
#
|
|
# This software may be used and distributed according to the terms
|
|
# of the GNU General Public License, incorporated herein by reference.
|
|
|
|
# enable importing on demand to reduce startup time
|
|
from mercurial import demandimport; demandimport.enable()
|
|
|
|
import sys
|
|
import mercurial.util
|
|
import mercurial.dispatch
|
|
|
|
for fp in (sys.stdin, sys.stdout, sys.stderr):
|
|
mercurial.util.set_binary(fp)
|
|
|
|
mercurial.dispatch.run()
|