D5601: remotefilelog: implement __bool__ as well as __nonzero__ for py3

durin42 (Augie Fackler) phabricator at mercurial-scm.org
Wed Jan 16 11:16:15 EST 2019


durin42 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D5601

AFFECTED FILES
  hgext/remotefilelog/remotefilelog.py

CHANGE DETAILS

diff --git a/hgext/remotefilelog/remotefilelog.py b/hgext/remotefilelog/remotefilelog.py
--- a/hgext/remotefilelog/remotefilelog.py
+++ b/hgext/remotefilelog/remotefilelog.py
@@ -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.



To: durin42, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list