Extends Storage interface with Dolt-specific version control capabilities: - New VersionedStorage interface in storage/versioned.go with: - History queries: History(), AsOf(), Diff() - Branch operations: Branch(), Merge(), CurrentBranch(), ListBranches() - Commit operations: Commit(), GetCurrentCommit() - Conflict resolution: GetConflicts(), ResolveConflicts() - Helper types: HistoryEntry, DiffEntry, Conflict - DoltStore implements VersionedStorage interface - New CLI commands: - bd history <id> - Show issue version history - bd diff <from> <to> - Show changes between commits/branches - bd branch [name] - List or create branches - bd vc merge <branch> - Merge branch to current - bd vc commit -m <msg> - Create a commit - bd vc status - Show current branch/commit - Added --as-of flag to bd show for time-travel queries - IsVersioned() helper for graceful SQLite backend detection Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
25 lines
854 B
Go
25 lines
854 B
Go
package dolt
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/steveyegge/beads/internal/storage"
|
|
)
|
|
|
|
// TestDoltStoreImplementsVersionedStorage verifies DoltStore implements VersionedStorage.
|
|
// This is a compile-time check.
|
|
func TestDoltStoreImplementsVersionedStorage(t *testing.T) {
|
|
// The var _ declaration in versioned.go already ensures this at compile time.
|
|
// This test just documents the expectation.
|
|
|
|
var _ storage.VersionedStorage = (*DoltStore)(nil)
|
|
}
|
|
|
|
// TestVersionedStorageMethodsExist ensures all required methods are defined.
|
|
// This is mostly a documentation test since Go's type system enforces this.
|
|
func TestVersionedStorageMethodsExist(t *testing.T) {
|
|
// If DoltStore doesn't implement all VersionedStorage methods,
|
|
// this file won't compile. This test exists for documentation.
|
|
t.Log("DoltStore implements all VersionedStorage methods")
|
|
}
|