Mercurial > hg
diff hgext/remotefilelog/__init__.py @ 50895:a834ec41f17c
remotefilelog: use sysstr to check for attribute presence
We do not need bytes here.
author | Pierre-Yves David <pierre-yves.david@octobus.net> |
---|---|
date | Wed, 30 Aug 2023 13:07:00 +0200 |
parents | cbd1da102417 |
children | d718eddf01d9 |
line wrap: on
line diff
--- a/hgext/remotefilelog/__init__.py Wed Aug 30 13:02:43 2023 +0200 +++ b/hgext/remotefilelog/__init__.py Wed Aug 30 13:07:00 2023 +0200 @@ -425,7 +425,7 @@ finally: if opts.get('shallow'): for r in repos: - if util.safehasattr(r, b'fileservice'): + if util.safehasattr(r, 'fileservice'): r.fileservice.close() @@ -904,7 +904,7 @@ if not isenabled(repo): continue - if not util.safehasattr(repo, b'name'): + if not util.safehasattr(repo, 'name'): ui.warn( _(b"repo %s is a misconfigured remotefilelog repo\n") % path ) @@ -1034,7 +1034,7 @@ bgprefetchrevs = revdatelimit(ui, bgprefetchrevs) def anon(unused_success): - if util.safehasattr(repo, b'ranprefetch') and repo.ranprefetch: + if util.safehasattr(repo, 'ranprefetch') and repo.ranprefetch: return repo.ranprefetch = True repo.backgroundprefetch(bgprefetchrevs, repack=bgrepack) @@ -1080,9 +1080,9 @@ source, heads=heads, common=common, bundlecaps=bundlecaps, **kwargs ) - if util.safehasattr(remote, b'_callstream'): + if util.safehasattr(remote, '_callstream'): remote._localrepo = repo - elif util.safehasattr(remote, b'getbundle'): + elif util.safehasattr(remote, 'getbundle'): extensions.wrapfunction(remote, 'getbundle', localgetbundle) return orig(repo, remote, *args, **kwargs)