##// END OF EJS Templates
share: move the requirement initialisation code around...
marmoute -
r49296:7964a2db default
parent child Browse files
Show More
@@ -3566,16 +3566,6 b' def newreporequirements(ui, createopts):'
3566 Extensions can wrap this function to specify custom requirements for
3566 Extensions can wrap this function to specify custom requirements for
3567 new repositories.
3567 new repositories.
3568 """
3568 """
3569 # If the repo is being created from a shared repository, we copy
3570 # its requirements.
3571 if b'sharedrepo' in createopts:
3572 requirements = set(createopts[b'sharedrepo'].requirements)
3573 if createopts.get(b'sharedrelative'):
3574 requirements.add(requirementsmod.RELATIVE_SHARED_REQUIREMENT)
3575 else:
3576 requirements.add(requirementsmod.SHARED_REQUIREMENT)
3577
3578 return requirements
3579
3569
3580 if b'backend' not in createopts:
3570 if b'backend' not in createopts:
3581 raise error.ProgrammingError(
3571 raise error.ProgrammingError(
@@ -3671,6 +3661,17 b' def newreporequirements(ui, createopts):'
3671 if ui.configbool(b'format', b'use-share-safe'):
3661 if ui.configbool(b'format', b'use-share-safe'):
3672 requirements.add(requirementsmod.SHARESAFE_REQUIREMENT)
3662 requirements.add(requirementsmod.SHARESAFE_REQUIREMENT)
3673
3663
3664 # If the repo is being created from a shared repository, we copy
3665 # its requirements.
3666 if b'sharedrepo' in createopts:
3667 requirements = set(createopts[b'sharedrepo'].requirements)
3668 if createopts.get(b'sharedrelative'):
3669 requirements.add(requirementsmod.RELATIVE_SHARED_REQUIREMENT)
3670 else:
3671 requirements.add(requirementsmod.SHARED_REQUIREMENT)
3672
3673 return requirements
3674
3674 return requirements
3675 return requirements
3675
3676
3676
3677
General Comments 0
You need to be logged in to leave comments. Login now