Mercurial > public > mercurial-scm > hg
comparison mercurial/manifest.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 | 32837c7e2e4b |
children | 18c8c18993f0 |
comparison
equal
deleted
inserted
replaced
50924:7a8ea1397816 | 50925:d718eddf01d9 |
---|---|
1626 """ | 1626 """ |
1627 return self._revlog | 1627 return self._revlog |
1628 | 1628 |
1629 def _setupmanifestcachehooks(self, repo): | 1629 def _setupmanifestcachehooks(self, repo): |
1630 """Persist the manifestfulltextcache on lock release""" | 1630 """Persist the manifestfulltextcache on lock release""" |
1631 if not util.safehasattr(repo, '_wlockref'): | 1631 if not hasattr(repo, '_wlockref'): |
1632 return | 1632 return |
1633 | 1633 |
1634 self._fulltextcache._opener = repo.wcachevfs | 1634 self._fulltextcache._opener = repo.wcachevfs |
1635 if repo._currentlock(repo._wlockref) is None: | 1635 if repo._currentlock(repo._wlockref) is None: |
1636 return | 1636 return |