Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/worker.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 | 02b36e860e0b |
comparison
equal
deleted
inserted
replaced
34645:75979c8d4572 | 34646:238abf65a8ad |
---|---|
51 return n | 51 return n |
52 except ValueError: | 52 except ValueError: |
53 raise error.Abort(_('number of cpus must be an integer')) | 53 raise error.Abort(_('number of cpus must be an integer')) |
54 return min(max(countcpus(), 4), 32) | 54 return min(max(countcpus(), 4), 32) |
55 | 55 |
56 if pycompat.osname == 'posix': | 56 if pycompat.isposix: |
57 _startupcost = 0.01 | 57 _startupcost = 0.01 |
58 else: | 58 else: |
59 _startupcost = 1e30 | 59 _startupcost = 1e30 |
60 | 60 |
61 def worthwhile(ui, costperop, nops): | 61 def worthwhile(ui, costperop, nops): |