comparison 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
comparison
equal deleted inserted replaced
41250:8a6995513d9a 41251:beb0d944a99b
194 return nodetext != text 194 return nodetext != text
195 195
196 def __nonzero__(self): 196 def __nonzero__(self):
197 return True 197 return True
198 198
199 __bool__ = __nonzero__
200
199 def __len__(self): 201 def __len__(self):
200 if self.filename == '.hgtags': 202 if self.filename == '.hgtags':
201 # The length of .hgtags is used to fast path tag checking. 203 # The length of .hgtags is used to fast path tag checking.
202 # remotefilelog doesn't support .hgtags since the entire .hgtags 204 # remotefilelog doesn't support .hgtags since the entire .hgtags
203 # history is needed. Use the excludepattern setting to make 205 # history is needed. Use the excludepattern setting to make