largefile: use sysstr to check for attribute presence in `hgsubrepoarchive`
authorPierre-Yves David <pierre-yves.david@octobus.net>
Wed, 30 Aug 2023 13:32:45 +0200
changeset 50892 34a27addc286
parent 50891 1b265336c42b
child 50893 0e936b950731
largefile: use sysstr to check for attribute presence in `hgsubrepoarchive` We do not need bytes here.
hgext/largefiles/overrides.py
--- a/hgext/largefiles/overrides.py	Wed Aug 30 12:03:11 2023 +0200
+++ b/hgext/largefiles/overrides.py	Wed Aug 30 13:32:45 2023 +0200
@@ -1309,7 +1309,7 @@
 
 @eh.wrapfunction(subrepo.hgsubrepo, 'archive')
 def hgsubrepoarchive(orig, repo, archiver, prefix, match=None, decode=True):
-    lfenabled = util.safehasattr(repo._repo, b'_largefilesenabled')
+    lfenabled = util.safehasattr(repo._repo, '_largefilesenabled')
     if not lfenabled or not repo._repo.lfstatus:
         return orig(repo, archiver, prefix, match, decode)