Mercurial > hg
comparison contrib/dumprevlog @ 37120:a8a902d7176e
procutil: bulk-replace function calls to point to new module
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 24 Mar 2018 15:10:51 +0900 |
parents | a915465a731e |
children | a063b84ce064 |
comparison
equal
deleted
inserted
replaced
37119:d4a2e0d5d042 | 37120:a8a902d7176e |
---|---|
6 | 6 |
7 import sys | 7 import sys |
8 from mercurial import ( | 8 from mercurial import ( |
9 node, | 9 node, |
10 revlog, | 10 revlog, |
11 util, | 11 ) |
12 from mercurial.utils import ( | |
13 procutil, | |
12 ) | 14 ) |
13 | 15 |
14 for fp in (sys.stdin, sys.stdout, sys.stderr): | 16 for fp in (sys.stdin, sys.stdout, sys.stderr): |
15 util.setbinary(fp) | 17 procutil.setbinary(fp) |
16 | 18 |
17 def binopen(path, mode='rb'): | 19 def binopen(path, mode='rb'): |
18 if 'b' not in mode: | 20 if 'b' not in mode: |
19 mode = mode + 'b' | 21 mode = mode + 'b' |
20 return open(path, mode) | 22 return open(path, mode) |