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

login
register
mail settings
Submitter phabricator
Date Jan. 16, 2019, 5:21 p.m.
Message ID <cf6e26cf1e3b51270e76c86033a48a69@localhost.localdomain>
Download mbox | patch
Permalink /patch/37820/
State Not Applicable
Headers show

Comments

phabricator - Jan. 16, 2019, 5:21 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGbeb0d944a99b: remotefilelog: implement __bool__ as well as __nonzero__ for py3 (authored by durin42, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5601?vs=13261&id=13282

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

AFFECTED FILES
  hgext/remotefilelog/remotefilelog.py

CHANGE DETAILS




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

Patch

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.