MCPcopy Create free account
hub / github.com/brimdata/super / Revert

Method Revert

db/root.go:396–406  ·  view source on GitHub ↗
(ctx context.Context, poolID ksuid.KSUID, branchName string, commitID ksuid.KSUID, author, message string)

Source from the content-addressed store, hash-verified

394}
395
396func (r *Root) Revert(ctx context.Context, poolID ksuid.KSUID, branchName string, commitID ksuid.KSUID, author, message string) (ksuid.KSUID, error) {
397 pool, err := r.OpenPool(ctx, poolID)
398 if err != nil {
399 return ksuid.Nil, err
400 }
401 branch, err := pool.OpenBranchByName(ctx, branchName)
402 if err != nil {
403 return ksuid.Nil, err
404 }
405 return branch.Revert(ctx, commitID, author, message)
406}
407
408func (r *Root) Open(context.Context, *super.Context, string, string, sbuf.Pushdown) (sbuf.Puller, error) {
409 return nil, errors.New("cannot use 'file' or 'http' source in a database query")

Callers

nothing calls this directly

Calls 3

OpenPoolMethod · 0.95
OpenBranchByNameMethod · 0.80
RevertMethod · 0.65

Tested by

no test coverage detected