diff options
| author | Jeff Carr <[email protected]> | 2025-08-17 23:24:37 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-08-17 23:24:37 -0500 |
| commit | 631544356a3946933711e47b96a48f883b2c70a8 (patch) | |
| tree | ad1035f16fe86ca3a5b277be6c528edc81d2eab3 /applyPatch.go | |
| parent | 212c706e145cd5804b539cdb57b6972aaafc478d (diff) | |
attempt git am --abortv0.22.126
Diffstat (limited to 'applyPatch.go')
| -rw-r--r-- | applyPatch.go | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/applyPatch.go b/applyPatch.go index bc40ae3..2124acc 100644 --- a/applyPatch.go +++ b/applyPatch.go @@ -8,7 +8,6 @@ import ( "path/filepath" "strings" - "go.wit.com/lib/gui/shell" "go.wit.com/lib/protobuf/forgepb" "go.wit.com/lib/protobuf/gitpb" "go.wit.com/log" @@ -70,47 +69,6 @@ func countCurrentPatches(repo *gitpb.Repo) int { return len(result.Stdout) } -func applyPatchsetOLD(pset *forgepb.Patchset) error { - var everythingworked bool = true - tmpdir, err := os.MkdirTemp("", "forge") - if err != nil { - return err - } - // log.Info("got to applyPatches() pset", pset) - log.Info("applyPatches() NAME", pset.Name) - log.Info("applyPatches() COMMENT", pset.Comment) - log.Info("applyPatches() GIT_AUTHOR_NAME", pset.GetGitAuthorName()) - log.Info("applyPatches() GIT_AUTHOR_EMAIL", pset.GetGitAuthorEmail()) - all := pset.Patches.SortByFilename() - for all.Scan() { - p := all.Next() - - basedir := me.forge.GetGoSrc() - if fullname, err := savePatchFile(p, basedir); err != nil { - log.Info(fullname, "save failed", err) - continue - } else { - basedir, filename := filepath.Split(fullname) - cmd := []string{"git", "am", filename} - log.Info("Should run: at", basedir, ":", cmd) - log.Info(basedir, filename) - result := shell.PathRun(basedir, cmd) - for _, line := range result.Stdout { - log.Warn("stdout:", line) - } - for _, line := range result.Stderr { - log.Warn("stderr:", line) - } - } - everythingworked = false - } - if everythingworked { - os.RemoveAll(tmpdir) // clean up - } - log.Info("THIS IS THE END MY FRIEND") - return nil -} - func savePatchFile(p *forgepb.Patch, basedir string) (string, error) { basepath, filename := filepath.Split(p.Filename) fulldir := filepath.Join(basedir, basepath) |
