Mercurial > hg
diff hgext/remotefilelog/remotefilelogserver.py @ 50928: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 | a834ec41f17c |
children | 0d414fb8336f |
line wrap: on
line diff
--- a/hgext/remotefilelog/remotefilelogserver.py Thu Dec 08 15:33:19 2022 +0100 +++ b/hgext/remotefilelog/remotefilelogserver.py Thu Aug 31 23:56:15 2023 +0200 @@ -228,7 +228,7 @@ # When generating file blobs, taking the real path is too slow on large # repos, so force it to just return the linkrev directly. repo = self._repo - if util.safehasattr(repo, 'forcelinkrev') and repo.forcelinkrev: + if hasattr(repo, 'forcelinkrev') and repo.forcelinkrev: return self._filelog.linkrev(self._filelog.rev(self._filenode)) return orig(self, *args, **kwargs)