mercurial/localrepo.py
changeset 47441 e33c6dd346e7
parent 47440 e43e68624dfb
child 47822 2813d406b036
equal deleted inserted replaced
47440:e43e68624dfb 47441:e33c6dd346e7
  3483         createopts[b'backend'] = ui.config(b'storage', b'new-repo-backend')
  3483         createopts[b'backend'] = ui.config(b'storage', b'new-repo-backend')
  3484 
  3484 
  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 
  3491     Extensions can wrap this function to specify custom requirements for
  3509     Extensions can wrap this function to specify custom requirements for
  3492     new repositories.
  3510     new repositories.