pama

package
v0.0.0-...-0798a42 Latest Latest
Warning

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

Go to latest
Published: Apr 16, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PatchManager

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

func FromFunc

func FromFunc(d detectFn, r rcFn, s storeFn) PatchManager

func New

func New() PatchManager

func (PatchManager) ApplyCmd

func (m PatchManager) ApplyCmd(p models.Project) (string, error)

func (PatchManager) ApplyUpdate

func (m PatchManager) ApplyUpdate(p models.Project, patch, commitID string,
	kv map[string]string,
) (models.Project, error)

ApplyUpdate is called after the commits have been applied with the ApplyCmd(). It will determine the additional commits from the commitID (last HEAD position), assign the patch tag to those commits and store them in project p.

func (PatchManager) Clean

func (m PatchManager) Clean(p models.Project) bool

func (PatchManager) CreateWorktree

func (m PatchManager) CreateWorktree(p models.Project, commitID, tag string,
) (models.Project, error)

func (PatchManager) CurrentPatches

func (m PatchManager) CurrentPatches() ([]string, error)

func (PatchManager) CurrentProject

func (m PatchManager) CurrentProject() (p models.Project, err error)

func (PatchManager) DropPatch

func (m PatchManager) DropPatch(patch string) error

func (PatchManager) Find

func (m PatchManager) Find(hash string, p models.Project) (models.Commit, error)

func (PatchManager) Head

func (m PatchManager) Head(p models.Project) (string, error)

func (PatchManager) Init

func (m PatchManager) Init(name, path string, overwrite bool) error

Init creats a new revision control project

func (PatchManager) Names

func (m PatchManager) Names() ([]string, error)

func (PatchManager) NewReader

func (m PatchManager) NewReader(projects []models.Project) io.Reader

func (PatchManager) Projects

func (m PatchManager) Projects(name string) ([]models.Project, error)

func (PatchManager) RebaseCommits

func (m PatchManager) RebaseCommits(p models.Project, baseID string) ([]models.Commit, error)

RebaseCommits fetches the commits between baseID and HEAD. The tags from the current project will be mapped onto the fetched commits based on either the commit hash or the commit subject.

func (PatchManager) SaveRebased

func (m PatchManager) SaveRebased(p models.Project, baseID string, commits []models.Commit) error

SaveRebased checks if the commits actually exist in the repo, repopulate the info fields and saves the baseID for project p.

func (PatchManager) SwitchProject

func (m PatchManager) SwitchProject(name string) error
func (m PatchManager) Unlink(name string) error

Unlink removes provided project

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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