mirror of
https://github.com/facebook/sapling.git
synced 2025-01-07 22:21:40 +03:00
rename util.set_binary to setbinary
This commit is contained in:
parent
c415440828
commit
0e6715fa28
@ -6,7 +6,7 @@ import sys
|
|||||||
from mercurial import revlog, node, util
|
from mercurial import revlog, node, util
|
||||||
|
|
||||||
for fp in (sys.stdin, sys.stdout, sys.stderr):
|
for fp in (sys.stdin, sys.stdout, sys.stderr):
|
||||||
util.set_binary(fp)
|
util.setbinary(fp)
|
||||||
|
|
||||||
for f in sys.argv[1:]:
|
for f in sys.argv[1:]:
|
||||||
binopen = lambda fn: open(fn, 'rb')
|
binopen = lambda fn: open(fn, 'rb')
|
||||||
|
@ -43,7 +43,7 @@ def showhelp():
|
|||||||
|
|
||||||
try:
|
try:
|
||||||
for fp in (sys.stdin, sys.stdout, sys.stderr):
|
for fp in (sys.stdin, sys.stdout, sys.stderr):
|
||||||
util.set_binary(fp)
|
util.setbinary(fp)
|
||||||
|
|
||||||
opts = {}
|
opts = {}
|
||||||
try:
|
try:
|
||||||
|
@ -7,7 +7,7 @@ import sys
|
|||||||
from mercurial import revlog, node, scmutil, util, transaction
|
from mercurial import revlog, node, scmutil, util, transaction
|
||||||
|
|
||||||
for fp in (sys.stdin, sys.stdout, sys.stderr):
|
for fp in (sys.stdin, sys.stdout, sys.stderr):
|
||||||
util.set_binary(fp)
|
util.setbinary(fp)
|
||||||
|
|
||||||
opener = scmutil.opener('.', False)
|
opener = scmutil.opener('.', False)
|
||||||
tr = transaction.transaction(sys.stderr.write, opener, "undump.journal")
|
tr = transaction.transaction(sys.stderr.write, opener, "undump.journal")
|
||||||
|
2
hg
2
hg
@ -33,6 +33,6 @@ import mercurial.util
|
|||||||
import mercurial.dispatch
|
import mercurial.dispatch
|
||||||
|
|
||||||
for fp in (sys.stdin, sys.stdout, sys.stderr):
|
for fp in (sys.stdin, sys.stdout, sys.stderr):
|
||||||
mercurial.util.set_binary(fp)
|
mercurial.util.setbinary(fp)
|
||||||
|
|
||||||
mercurial.dispatch.run()
|
mercurial.dispatch.run()
|
||||||
|
@ -112,8 +112,8 @@ def debugsvnlog(ui, **opts):
|
|||||||
"""Fetch SVN log in a subprocess and channel them back to parent to
|
"""Fetch SVN log in a subprocess and channel them back to parent to
|
||||||
avoid memory collection issues.
|
avoid memory collection issues.
|
||||||
"""
|
"""
|
||||||
util.set_binary(sys.stdin)
|
util.setbinary(sys.stdin)
|
||||||
util.set_binary(sys.stdout)
|
util.setbinary(sys.stdout)
|
||||||
args = decodeargs(sys.stdin.read())
|
args = decodeargs(sys.stdin.read())
|
||||||
get_log_child(sys.stdout, *args)
|
get_log_child(sys.stdout, *args)
|
||||||
|
|
||||||
|
@ -13,8 +13,8 @@ from mercurial import util
|
|||||||
from mercurial.hgweb import common
|
from mercurial.hgweb import common
|
||||||
|
|
||||||
def launch(application):
|
def launch(application):
|
||||||
util.set_binary(sys.stdin)
|
util.setbinary(sys.stdin)
|
||||||
util.set_binary(sys.stdout)
|
util.setbinary(sys.stdout)
|
||||||
|
|
||||||
environ = dict(os.environ.iteritems())
|
environ = dict(os.environ.iteritems())
|
||||||
environ.setdefault('PATH_INFO', '')
|
environ.setdefault('PATH_INFO', '')
|
||||||
|
@ -128,7 +128,7 @@ def checkosfilename(path):
|
|||||||
Returns None if the path is ok, or a UI string describing the problem.'''
|
Returns None if the path is ok, or a UI string describing the problem.'''
|
||||||
pass # on posix platforms, every path is ok
|
pass # on posix platforms, every path is ok
|
||||||
|
|
||||||
def set_binary(fd):
|
def setbinary(fd):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def pconvert(path):
|
def pconvert(path):
|
||||||
|
@ -21,8 +21,8 @@ class sshserver(object):
|
|||||||
sys.stdout = sys.stderr
|
sys.stdout = sys.stderr
|
||||||
|
|
||||||
# Prevent insertion/deletion of CRs
|
# Prevent insertion/deletion of CRs
|
||||||
util.set_binary(self.fin)
|
util.setbinary(self.fin)
|
||||||
util.set_binary(self.fout)
|
util.setbinary(self.fout)
|
||||||
|
|
||||||
def getargs(self, args):
|
def getargs(self, args):
|
||||||
data = {}
|
data = {}
|
||||||
|
@ -96,7 +96,7 @@ def checkexec(path):
|
|||||||
def checklink(path):
|
def checklink(path):
|
||||||
return False
|
return False
|
||||||
|
|
||||||
def set_binary(fd):
|
def setbinary(fd):
|
||||||
# When run without console, pipes may expose invalid
|
# When run without console, pipes may expose invalid
|
||||||
# fileno(), usually set to -1.
|
# fileno(), usually set to -1.
|
||||||
if hasattr(fd, 'fileno') and fd.fileno() >= 0:
|
if hasattr(fd, 'fileno') and fd.fileno() >= 0:
|
||||||
|
Loading…
Reference in New Issue
Block a user