undo

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 21, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package undo saves, restores, and redoes checkout state in a Fossil .fslckout database.

The undo state machine uses a vvar entry "undo_available":

0 — nothing saved
1 — undo available (Save was called)
2 — redo available (Undo was called)

Only one level of undo/redo is kept; each Save replaces any previous state.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Redo

func Redo(ckout *sql.DB, dir string) error

Redo reverses the most recent Undo. It requires undo_available == 2.

func Save

func Save(ckout *sql.DB, dir string, pathnames []string) error

Save snapshots the current checkout state so it can be undone later. If pathnames is non-nil and non-empty, only those vfile entries are saved; otherwise all vfile rows are included.

func Undo

func Undo(ckout *sql.DB, dir string) error

Undo restores the state saved by the most recent Save call. It requires undo_available == 1.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL