##// END OF EJS Templates
localrepo: introduce a clone_requirements function...
marmoute -
r48234:e33c6dd3 default
parent child Browse files
Show More
@@ -3485,6 +3485,24 b' def defaultcreateopts(ui, createopts=Non'
3485 return createopts
3485 return createopts
3486
3486
3487
3487
3488 def clone_requirements(ui, createopts, srcrepo):
3489 """clone the requirements of a local repo for a local clone
3490
3491 The store requirements are unchanged while the working copy requirements
3492 depends on the configuration
3493 """
3494 target_requirements = set()
3495 createopts = defaultcreateopts(ui, createopts=createopts)
3496 for r in newreporequirements(ui, createopts):
3497 if r in requirementsmod.WORKING_DIR_REQUIREMENTS:
3498 target_requirements.add(r)
3499
3500 for r in srcrepo.requirements:
3501 if r not in requirementsmod.WORKING_DIR_REQUIREMENTS:
3502 target_requirements.add(r)
3503 return target_requirements
3504
3505
3488 def newreporequirements(ui, createopts):
3506 def newreporequirements(ui, createopts):
3489 """Determine the set of requirements for a new local repository.
3507 """Determine the set of requirements for a new local repository.
3490
3508
General Comments 0
You need to be logged in to leave comments. Login now