Mercurial > public > mercurial-scm > hg
comparison hgext/fastannotate/context.py @ 50925:d718eddf01d9
safehasattr: drop usage in favor of hasattr
The two functions should now be equivalent at least in their usage in core.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Thu, 31 Aug 2023 23:56:15 +0200 |
parents | d97227f42558 |
children | 18c8c18993f0 |
comparison
equal
deleted
inserted
replaced
50924:7a8ea1397816 | 50925:d718eddf01d9 |
---|---|
322 self.ui.debug( | 322 self.ui.debug( |
323 b'fastannotate: %s: using fast path ' | 323 b'fastannotate: %s: using fast path ' |
324 b'(resolved fctx: %s)\n' | 324 b'(resolved fctx: %s)\n' |
325 % ( | 325 % ( |
326 self.path, | 326 self.path, |
327 stringutil.pprint(util.safehasattr(revfctx, 'node')), | 327 stringutil.pprint(hasattr(revfctx, 'node')), |
328 ) | 328 ) |
329 ) | 329 ) |
330 return self.annotatedirectly(revfctx, showpath, showlines) | 330 return self.annotatedirectly(revfctx, showpath, showlines) |
331 | 331 |
332 # resolve master | 332 # resolve master |