Ensure snapshot is deleted from metadata as well
This commit is contained in:
@@ -96,10 +96,15 @@ class Repository(Hierarchy):
|
|||||||
def __delitem__(self, index):
|
def __delitem__(self, index):
|
||||||
"""Delete a Snapshot in this Repository.
|
"""Delete a Snapshot in this Repository.
|
||||||
|
|
||||||
|
This method makes the assumption that snapshots
|
||||||
|
and snapshot metadata are in the same order, and that
|
||||||
|
the two lists are the same size.
|
||||||
|
|
||||||
:param index: index of snapshot to delete
|
:param index: index of snapshot to delete
|
||||||
:type index: int
|
:type index: int
|
||||||
"""
|
"""
|
||||||
del self._snapshots[index]
|
del self._snapshots[index]
|
||||||
|
del self._snapshot_metadata[index]
|
||||||
|
|
||||||
def __getitem__(self, idx):
|
def __getitem__(self, idx):
|
||||||
"""Retrieve a Snapshot at a certain index."""
|
"""Retrieve a Snapshot at a certain index."""
|
||||||
@@ -125,9 +130,7 @@ class Repository(Hierarchy):
|
|||||||
* Contain slashes
|
* Contain slashes
|
||||||
* Are empty values
|
* Are empty values
|
||||||
|
|
||||||
Valid names:
|
Valid names match the regex ``[\\w]+[^/]*``
|
||||||
|
|
||||||
* Match the regex r'[\\w]+[^/]*'
|
|
||||||
|
|
||||||
:param name: name to validate
|
:param name: name to validate
|
||||||
:type name: str
|
:type name: str
|
||||||
|
Reference in New Issue
Block a user