diff -r 89aec1834a86 -r 531332502568 mercurial/keepalive.py --- a/mercurial/keepalive.py Sun Apr 24 18:41:23 2016 +0900 +++ b/mercurial/keepalive.py Fri Sep 29 15:49:43 2017 +0000 @@ -393,7 +393,7 @@ def read(self, amt=None): # the _rbuf test is only in this first if for speed. It's not # logically necessary - if self._rbuf and not amt is None: + if self._rbuf and amt is not None: L = len(self._rbuf) if amt > L: amt -= L