Add api and script to restore

This commit is contained in:
WQY\qiong
2023-03-31 10:44:15 +08:00
parent 924dbc802c
commit 610e7ee561
5 changed files with 30 additions and 1 deletions

View File

@@ -339,3 +339,8 @@ def set_restore_operation(name: str, operation: int) -> None:
def set_restore_operation_to_current(name: str) -> None:
return set_restore_operation(name, get_current_operation(name))
def restore(name: str, discard: bool) -> ChangeSet:
op = get_restore_operation(name)
return pick_operation(name, op, discard)