From 0e6715fa28a6102499bc88bf55e5579afd45b721 Mon Sep 17 00:00:00 2001 From: Adrian Buehlmann Date: Fri, 6 May 2011 15:25:35 +0200 Subject: [PATCH] rename util.set_binary to setbinary --- contrib/dumprevlog | 2 +- contrib/simplemerge | 2 +- contrib/undumprevlog | 2 +- hg | 2 +- hgext/convert/subversion.py | 4 ++-- mercurial/hgweb/wsgicgi.py | 4 ++-- mercurial/posix.py | 2 +- mercurial/sshserver.py | 4 ++-- mercurial/windows.py | 2 +- 9 files changed, 12 insertions(+), 12 deletions(-) diff --git a/contrib/dumprevlog b/contrib/dumprevlog index caf287d49b..8bb9c4eaf7 100755 --- a/contrib/dumprevlog +++ b/contrib/dumprevlog @@ -6,7 +6,7 @@ import sys from mercurial import revlog, node, util for fp in (sys.stdin, sys.stdout, sys.stderr): - util.set_binary(fp) + util.setbinary(fp) for f in sys.argv[1:]: binopen = lambda fn: open(fn, 'rb') diff --git a/contrib/simplemerge b/contrib/simplemerge index 3a0897f5ad..0c548143f2 100755 --- a/contrib/simplemerge +++ b/contrib/simplemerge @@ -43,7 +43,7 @@ def showhelp(): try: for fp in (sys.stdin, sys.stdout, sys.stderr): - util.set_binary(fp) + util.setbinary(fp) opts = {} try: diff --git a/contrib/undumprevlog b/contrib/undumprevlog index 04eacb9a83..3e074d494c 100755 --- a/contrib/undumprevlog +++ b/contrib/undumprevlog @@ -7,7 +7,7 @@ import sys from mercurial import revlog, node, scmutil, util, transaction for fp in (sys.stdin, sys.stdout, sys.stderr): - util.set_binary(fp) + util.setbinary(fp) opener = scmutil.opener('.', False) tr = transaction.transaction(sys.stderr.write, opener, "undump.journal") diff --git a/hg b/hg index b9c7c47f7b..712b33f642 100755 --- a/hg +++ b/hg @@ -33,6 +33,6 @@ import mercurial.util import mercurial.dispatch for fp in (sys.stdin, sys.stdout, sys.stderr): - mercurial.util.set_binary(fp) + mercurial.util.setbinary(fp) mercurial.dispatch.run() diff --git a/hgext/convert/subversion.py b/hgext/convert/subversion.py index a9b08cf816..b065446766 100644 --- a/hgext/convert/subversion.py +++ b/hgext/convert/subversion.py @@ -112,8 +112,8 @@ def debugsvnlog(ui, **opts): """Fetch SVN log in a subprocess and channel them back to parent to avoid memory collection issues. """ - util.set_binary(sys.stdin) - util.set_binary(sys.stdout) + util.setbinary(sys.stdin) + util.setbinary(sys.stdout) args = decodeargs(sys.stdin.read()) get_log_child(sys.stdout, *args) diff --git a/mercurial/hgweb/wsgicgi.py b/mercurial/hgweb/wsgicgi.py index c720297a8c..6de394c3bb 100644 --- a/mercurial/hgweb/wsgicgi.py +++ b/mercurial/hgweb/wsgicgi.py @@ -13,8 +13,8 @@ from mercurial import util from mercurial.hgweb import common def launch(application): - util.set_binary(sys.stdin) - util.set_binary(sys.stdout) + util.setbinary(sys.stdin) + util.setbinary(sys.stdout) environ = dict(os.environ.iteritems()) environ.setdefault('PATH_INFO', '') diff --git a/mercurial/posix.py b/mercurial/posix.py index de01bf4729..1d20445f10 100644 --- a/mercurial/posix.py +++ b/mercurial/posix.py @@ -128,7 +128,7 @@ def checkosfilename(path): Returns None if the path is ok, or a UI string describing the problem.''' pass # on posix platforms, every path is ok -def set_binary(fd): +def setbinary(fd): pass def pconvert(path): diff --git a/mercurial/sshserver.py b/mercurial/sshserver.py index 669e691ec0..9a3b317d61 100644 --- a/mercurial/sshserver.py +++ b/mercurial/sshserver.py @@ -21,8 +21,8 @@ class sshserver(object): sys.stdout = sys.stderr # Prevent insertion/deletion of CRs - util.set_binary(self.fin) - util.set_binary(self.fout) + util.setbinary(self.fin) + util.setbinary(self.fout) def getargs(self, args): data = {} diff --git a/mercurial/windows.py b/mercurial/windows.py index 4a542fe461..2ea456d17b 100644 --- a/mercurial/windows.py +++ b/mercurial/windows.py @@ -96,7 +96,7 @@ def checkexec(path): def checklink(path): return False -def set_binary(fd): +def setbinary(fd): # When run without console, pipes may expose invalid # fileno(), usually set to -1. if hasattr(fd, 'fileno') and fd.fileno() >= 0: