fossilfs

package
v1.14.2 Latest Latest
Warning

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

Go to latest
Published: May 22, 2022 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CheckoutMarker is the marker file that indicates a fossil checkout.
	CheckoutMarker = ".fslckout"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Fossil

type Fossil struct {
	// contains filtered or unexported fields
}

Fossil is a storage backend for Fossil.

func Clone

func Clone(ctx context.Context, repo, path string) (*Fossil, error)

Clone opens a new fossil checkout.

func Init

func Init(ctx context.Context, path, _, _ string) (*Fossil, error)

Init initializes this store's fossil repo.

func New

func New(path string) (*Fossil, error)

New instantiates a new Fossil store.

func (*Fossil) Add

func (f *Fossil) Add(ctx context.Context, files ...string) error

Add adds the listed files to the fossil index.

func (*Fossil) AddRemote

func (f *Fossil) AddRemote(ctx context.Context, remote, url string) error

AddRemote adds a new remote.

func (*Fossil) Cmd

func (f *Fossil) Cmd(ctx context.Context, name string, args ...string) error

Cmd runs an fossil command.

func (*Fossil) Commit

func (f *Fossil) Commit(ctx context.Context, msg string) error

Commit creates a new fossil commit with the given commit message.

func (*Fossil) Compact

func (f *Fossil) Compact(ctx context.Context) error

Compact will run fossil rebuild.

func (*Fossil) ConfigGet

func (f *Fossil) ConfigGet(ctx context.Context, key string) (string, error)

ConfigGet returns a given config value.

func (*Fossil) ConfigList

func (f *Fossil) ConfigList(ctx context.Context) (map[string]string, error)

ConfigList returns all fossil config settings.

func (*Fossil) ConfigSet

func (f *Fossil) ConfigSet(ctx context.Context, key, value string) error

ConfigSet sets a local config value.

func (*Fossil) Delete

func (f *Fossil) Delete(ctx context.Context, name string) error

Delete removes the named entity.

func (*Fossil) Exists

func (f *Fossil) Exists(ctx context.Context, name string) bool

Exists checks if the named entity exists.

func (*Fossil) Fsck

func (f *Fossil) Fsck(ctx context.Context) error

Fsck checks the storage integrity.

func (*Fossil) Get

func (f *Fossil) Get(ctx context.Context, name string) ([]byte, error)

Get retrieves the named content.

func (*Fossil) GetRevision

func (f *Fossil) GetRevision(ctx context.Context, name, revision string) ([]byte, error)

GetRevision will return the content of any revision of the named entity.

func (*Fossil) HasStagedChanges

func (f *Fossil) HasStagedChanges(ctx context.Context) bool

HasStagedChanges returns true if there are any staged changes which can be committed.

func (*Fossil) InitConfig

func (f *Fossil) InitConfig(ctx context.Context, _, _ string) error

InitConfig initializes the fossil config.

func (*Fossil) IsDir

func (f *Fossil) IsDir(ctx context.Context, name string) bool

IsDir returns true if the named entity is a directory.

func (*Fossil) IsInitialized

func (f *Fossil) IsInitialized() bool

IsInitialized returns true if this stores has an (probably) initialized Fossil chkecout.

func (f *Fossil) Link(ctx context.Context, from, to string) error

Link creates a symlink.

func (*Fossil) List

func (f *Fossil) List(ctx context.Context, prefix string) ([]string, error)

List returns a list of all entities e.g. foo, far/bar baz/.bang directory separator are normalized using `/`.

func (*Fossil) ListUntrackedFiles

func (f *Fossil) ListUntrackedFiles(ctx context.Context) []string

ListUntrackedFiles lists untracked files.

func (*Fossil) Move added in v1.14.1

func (f *Fossil) Move(ctx context.Context, src, dst string, del bool) error

Move moves from src to dst.

func (*Fossil) Name

func (f *Fossil) Name() string

Name returns 'fossil'.

func (*Fossil) Path

func (f *Fossil) Path() string

Path returns the path to this storage.

func (*Fossil) Prune

func (f *Fossil) Prune(ctx context.Context, prefix string) error

Prune removes a named directory.

func (*Fossil) Pull

func (f *Fossil) Pull(ctx context.Context, remote, branch string) error

Pull pulls from the fossil remote.

func (*Fossil) Push

func (f *Fossil) Push(ctx context.Context, remote, branch string) error

Push pushes to the fossil remote.

func (*Fossil) PushPull

func (f *Fossil) PushPull(ctx context.Context, op, remote, branch string) error

PushPull pushes the repo to it's origin. optional arguments: remote and branch.

func (*Fossil) RemoveRemote

func (f *Fossil) RemoveRemote(ctx context.Context, remote string) error

RemoveRemote removes a remote.

func (*Fossil) Revisions

func (f *Fossil) Revisions(ctx context.Context, name string) ([]backend.Revision, error)

Revisions will list all available revisions of the named entity.

func (*Fossil) Set

func (f *Fossil) Set(ctx context.Context, name string, value []byte) error

Set writes the given content.

func (*Fossil) Status

func (f *Fossil) Status(ctx context.Context) ([]byte, error)

Status return the fossil status output.

func (*Fossil) String

func (f *Fossil) String() string

String implements fmt.Stringer.

func (*Fossil) Version

func (f *Fossil) Version(ctx context.Context) semver.Version

Version returns the fossil version as major, minor and patch level.

Jump to

Keyboard shortcuts

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