comparison mercurial/util.py @ 34646:238abf65a8ad

codemod: use pycompat.isposix This is done by: sed -i "s/pycompat\.osname == 'posix'/pycompat.isposix/" **/*.py Differential Revision: https://phab.mercurial-scm.org/D1036
author Jun Wu <quark@fb.com>
date Thu, 12 Oct 2017 09:04:22 -0700
parents 75979c8d4572
children dacfcdd8b94e
comparison
equal deleted inserted replaced
34645:75979c8d4572 34646:238abf65a8ad
311 def buffer(sliceable, offset=0, length=None): 311 def buffer(sliceable, offset=0, length=None):
312 if length is not None: 312 if length is not None:
313 return memoryview(sliceable)[offset:offset + length] 313 return memoryview(sliceable)[offset:offset + length]
314 return memoryview(sliceable)[offset:] 314 return memoryview(sliceable)[offset:]
315 315
316 closefds = pycompat.osname == 'posix' 316 closefds = pycompat.isposix
317 317
318 _chunksize = 4096 318 _chunksize = 4096
319 319
320 class bufferedinputpipe(object): 320 class bufferedinputpipe(object):
321 """a manually buffered input pipe 321 """a manually buffered input pipe