mercurial/localrepo.py
changeset 49313 5c01ca5f9f1e
parent 49306 2e726c934fcd
child 49343 4f04bb0d8deb
--- a/mercurial/localrepo.py	Wed Jun 01 01:30:48 2022 +0200
+++ b/mercurial/localrepo.py	Wed Jun 01 01:45:49 2022 +0200
@@ -523,12 +523,11 @@
     # which means very old repositories may not have one. We assume
     # a missing file translates to no requirements.
     try:
-        requirements = set(vfs.read(b'requires').splitlines())
+        return set(vfs.read(b'requires').splitlines())
     except FileNotFoundError:
         if not allowmissing:
             raise
-        requirements = set()
-    return requirements
+        return set()
 
 
 def makelocalrepository(baseui, path, intents=None):