Mercurial > hg
diff hgext/remotefilelog/remotefilelog.py @ 41251:beb0d944a99b
remotefilelog: implement __bool__ as well as __nonzero__ for py3
Differential Revision: https://phab.mercurial-scm.org/D5601
author | Augie Fackler <augie@google.com> |
---|---|
date | Wed, 16 Jan 2019 10:58:09 -0500 |
parents | 9769e0f6ffe0 |
children | 876494fd967d |
line wrap: on
line diff
--- a/hgext/remotefilelog/remotefilelog.py Wed Jan 16 10:57:38 2019 -0500 +++ b/hgext/remotefilelog/remotefilelog.py Wed Jan 16 10:58:09 2019 -0500 @@ -196,6 +196,8 @@ def __nonzero__(self): return True + __bool__ = __nonzero__ + def __len__(self): if self.filename == '.hgtags': # The length of .hgtags is used to fast path tag checking.