Move all snapshot attribute code to _gen_metadata
This commit is contained in:
parent
8c1774e9fe
commit
85e19952bd
@ -85,10 +85,6 @@ class Repository(Hierarchy):
|
|||||||
|
|
||||||
self._gen_metadata()
|
self._gen_metadata()
|
||||||
|
|
||||||
self._snapshots = [
|
|
||||||
Snapshot(self.snapshot_dir / s) for s in self._snapshot_metadata
|
|
||||||
]
|
|
||||||
|
|
||||||
self._snapshot_iterator = iter(self._snapshots)
|
self._snapshot_iterator = iter(self._snapshots)
|
||||||
|
|
||||||
def __contains__(self, name):
|
def __contains__(self, name):
|
||||||
@ -154,6 +150,10 @@ class Repository(Hierarchy):
|
|||||||
self.metadata_path.touch(mode=FILEMODE)
|
self.metadata_path.touch(mode=FILEMODE)
|
||||||
self.write_metadata(self._snapshot_metadata)
|
self.write_metadata(self._snapshot_metadata)
|
||||||
|
|
||||||
|
self._snapshots = [
|
||||||
|
Snapshot(self.snapshot_dir / s) for s in self._snapshot_metadata
|
||||||
|
]
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def snapshot_dir(self):
|
def snapshot_dir(self):
|
||||||
"""
|
"""
|
||||||
|
Loading…
x
Reference in New Issue
Block a user