hgext/largefiles/lfutil.py
changeset 50488 b4a9c8f18928
parent 50471 521fec115dad
child 50504 862e3a13da44
--- a/hgext/largefiles/lfutil.py	Mon May 15 09:00:46 2023 +0200
+++ b/hgext/largefiles/lfutil.py	Mon May 15 09:01:02 2023 +0200
@@ -551,11 +551,10 @@
 
 def islfilesrepo(repo):
     '''Return true if the repo is a largefile repo.'''
-    if b'largefiles' in repo.requirements and any(
-        shortnameslash in entry.unencoded_path
-        for entry in repo.store.datafiles()
-    ):
-        return True
+    if b'largefiles' in repo.requirements:
+        for entry in repo.store.datafiles():
+            if entry.is_revlog and shortnameslash in entry.target_id:
+                return True
 
     return any(openlfdirstate(repo.ui, repo, False))