sto_rollback

def sto_rollback(file_path: str, n: int = 1, time: str = None) -> str

Source code

Descriptions: Rollback files to a specific version

Parameters:

  • file_path (str): Path to the file

  • n (int): Number of versions to roll back (default: 1)

  • time (str): ISO format timestamp to roll back to (optional)

Returns:

  • Success message (str): "Successfully rolled back the file: {file_path} to its previous {n} version"

  • Failure message (str): "Failed to roll back the file: {file_path} to its previous {n} version"

  • Redis error (str): "Redis is not enabled. Please make sure the redis server has been installed and running."

Last updated