equal
deleted
inserted
replaced
532 extrastate = {} |
532 extrastate = {} |
533 |
533 |
534 for iface, fn in REPO_INTERFACES: |
534 for iface, fn in REPO_INTERFACES: |
535 # We pass all potentially useful state to give extensions tons of |
535 # We pass all potentially useful state to give extensions tons of |
536 # flexibility. |
536 # flexibility. |
537 typ = fn(ui=ui, |
537 typ = fn()(ui=ui, |
538 intents=intents, |
538 intents=intents, |
539 requirements=requirements, |
539 requirements=requirements, |
540 features=features, |
540 features=features, |
541 wdirvfs=wdirvfs, |
541 wdirvfs=wdirvfs, |
542 hgvfs=hgvfs, |
542 hgvfs=hgvfs, |
801 else: |
801 else: |
802 return revlogfilestorage |
802 return revlogfilestorage |
803 |
803 |
804 # List of repository interfaces and factory functions for them. Each |
804 # List of repository interfaces and factory functions for them. Each |
805 # will be called in order during ``makelocalrepository()`` to iteratively |
805 # will be called in order during ``makelocalrepository()`` to iteratively |
806 # derive the final type for a local repository instance. |
806 # derive the final type for a local repository instance. We capture the |
|
807 # function as a lambda so we don't hold a reference and the module-level |
|
808 # functions can be wrapped. |
807 REPO_INTERFACES = [ |
809 REPO_INTERFACES = [ |
808 (repository.ilocalrepositorymain, makemain), |
810 (repository.ilocalrepositorymain, lambda: makemain), |
809 (repository.ilocalrepositoryfilestorage, makefilestorage), |
811 (repository.ilocalrepositoryfilestorage, lambda: makefilestorage), |
810 ] |
812 ] |
811 |
813 |
812 @interfaceutil.implementer(repository.ilocalrepositorymain) |
814 @interfaceutil.implementer(repository.ilocalrepositorymain) |
813 class localrepository(object): |
815 class localrepository(object): |
814 """Main class for representing local repositories. |
816 """Main class for representing local repositories. |