##// END OF EJS Templates
repo: add a `wcachevfs` to access the `.hg/wcache/` directory...
Boris Feld -
r40826:e1c3a2e9 default
parent child Browse files
Show More
@@ -508,6 +508,8 b' def makelocalrepository(baseui, path, in'
508 else:
508 else:
509 storebasepath = hgvfs.base
509 storebasepath = hgvfs.base
510 cachepath = hgvfs.join(b'cache')
510 cachepath = hgvfs.join(b'cache')
511 wcachepath = hgvfs.join(b'wcache')
512
511
513
512 # The store has changed over time and the exact layout is dictated by
514 # The store has changed over time and the exact layout is dictated by
513 # requirements. The store interface abstracts differences across all
515 # requirements. The store interface abstracts differences across all
@@ -522,6 +524,9 b' def makelocalrepository(baseui, path, in'
522 # The cache vfs is used to manage cache files.
524 # The cache vfs is used to manage cache files.
523 cachevfs = vfsmod.vfs(cachepath, cacheaudited=True)
525 cachevfs = vfsmod.vfs(cachepath, cacheaudited=True)
524 cachevfs.createmode = store.createmode
526 cachevfs.createmode = store.createmode
527 # The cache vfs is used to manage cache files related to the working copy
528 wcachevfs = vfsmod.vfs(wcachepath, cacheaudited=True)
529 wcachevfs.createmode = store.createmode
525
530
526 # Now resolve the type for the repository object. We do this by repeatedly
531 # Now resolve the type for the repository object. We do this by repeatedly
527 # calling a factory function to produces types for specific aspects of the
532 # calling a factory function to produces types for specific aspects of the
@@ -544,6 +549,7 b' def makelocalrepository(baseui, path, in'
544 storevfs=storevfs,
549 storevfs=storevfs,
545 storeoptions=storevfs.options,
550 storeoptions=storevfs.options,
546 cachevfs=cachevfs,
551 cachevfs=cachevfs,
552 wcachevfs=wcachevfs,
547 extensionmodulenames=extensionmodulenames,
553 extensionmodulenames=extensionmodulenames,
548 extrastate=extrastate,
554 extrastate=extrastate,
549 baseclasses=bases)
555 baseclasses=bases)
@@ -574,6 +580,7 b' def makelocalrepository(baseui, path, in'
574 sharedpath=storebasepath,
580 sharedpath=storebasepath,
575 store=store,
581 store=store,
576 cachevfs=cachevfs,
582 cachevfs=cachevfs,
583 wcachevfs=wcachevfs,
577 features=features,
584 features=features,
578 intents=intents)
585 intents=intents)
579
586
@@ -889,7 +896,7 b' class localrepository(object):'
889 }
896 }
890
897
891 def __init__(self, baseui, ui, origroot, wdirvfs, hgvfs, requirements,
898 def __init__(self, baseui, ui, origroot, wdirvfs, hgvfs, requirements,
892 supportedrequirements, sharedpath, store, cachevfs,
899 supportedrequirements, sharedpath, store, cachevfs, wcachevfs,
893 features, intents=None):
900 features, intents=None):
894 """Create a new local repository instance.
901 """Create a new local repository instance.
895
902
@@ -932,6 +939,9 b' class localrepository(object):'
932 cachevfs
939 cachevfs
933 ``vfs.vfs`` used for cache files.
940 ``vfs.vfs`` used for cache files.
934
941
942 wcachevfs
943 ``vfs.vfs`` used for cache files related to the working copy.
944
935 features
945 features
936 ``set`` of bytestrings defining features/capabilities of this
946 ``set`` of bytestrings defining features/capabilities of this
937 instance.
947 instance.
@@ -954,6 +964,7 b' class localrepository(object):'
954 self.sharedpath = sharedpath
964 self.sharedpath = sharedpath
955 self.store = store
965 self.store = store
956 self.cachevfs = cachevfs
966 self.cachevfs = cachevfs
967 self.wcachevfs = wcachevfs
957 self.features = features
968 self.features = features
958
969
959 self.filtername = None
970 self.filtername = None
@@ -1435,6 +1435,12 b' class ilocalrepositorymain(interfaceutil'
1435 Typically .hg/cache.
1435 Typically .hg/cache.
1436 """)
1436 """)
1437
1437
1438 wcachevfs = interfaceutil.Attribute(
1439 """A VFS used to access the cache directory dedicated to working copy
1440
1441 Typically .hg/wcache.
1442 """)
1443
1438 filteredrevcache = interfaceutil.Attribute(
1444 filteredrevcache = interfaceutil.Attribute(
1439 """Holds sets of revisions to be filtered.""")
1445 """Holds sets of revisions to be filtered.""")
1440
1446
General Comments 0
You need to be logged in to leave comments. Login now