--- a/mercurial/localrepo.py Mon Jan 10 12:48:35 2022 +0100
+++ b/mercurial/localrepo.py Tue Jan 11 09:36:10 2022 +0100
@@ -3543,6 +3543,10 @@
depends on the configuration
"""
target_requirements = set()
+ if not srcrepo.requirements:
+ # this is a legacy revlog "v0" repository, we cannot do anything fancy
+ # with it.
+ return target_requirements
createopts = defaultcreateopts(ui, createopts=createopts)
for r in newreporequirements(ui, createopts):
if r in requirementsmod.WORKING_DIR_REQUIREMENTS: