summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doMerge.go18
-rw-r--r--doPatch.go26
-rw-r--r--helperPatches.go2
3 files changed, 33 insertions, 13 deletions
diff --git a/doMerge.go b/doMerge.go
index 518b483..f30358b 100644
--- a/doMerge.go
+++ b/doMerge.go
@@ -4,10 +4,27 @@
package main
import (
+ "go.wit.com/lib/protobuf/forgepb"
"go.wit.com/lib/protobuf/gitpb"
"go.wit.com/log"
)
+func doMergeReport() *forgepb.Patches {
+ found := forgepb.NewPatches()
+ for repo := range me.forge.Repos.IterAll() {
+ if repo.GetDevelVersion() == repo.GetMasterVersion() {
+ continue
+ }
+ tmp := log.Sprintf("%s..%s", repo.GetMasterVersion(), repo.GetDevelVersion())
+ r, err := repo.RunStrict([]string{"git", "log", "--pretty=format:%H", tmp})
+ _ = err
+ for i, line := range r.Stdout {
+ log.Info(i, line, repo.FullPath)
+ }
+ }
+ return found
+}
+
func doMergeDevel() (*gitpb.Repos, error) {
var err error
done := gitpb.NewRepos()
@@ -37,7 +54,6 @@ func doMergeDevel() (*gitpb.Repos, error) {
}
done.Append(repo)
}
- configSave = true
return done, err
}
diff --git a/doPatch.go b/doPatch.go
index 5b47c34..b41f6a7 100644
--- a/doPatch.go
+++ b/doPatch.go
@@ -63,16 +63,20 @@ func doPatch() error {
}
if argv.Patch.Check != nil {
- old := findExpired()
- // old.PrintTable()
- for p := range old.IterAll() {
- log.Info("patch", p.Filename, p.Namespace)
- }
- newpb, err := old.HttpPostVerbose(myServer(), "check")
- if err != nil {
- return err
- }
- newpb.PrintTable()
+ /*
+ old := findExpired()
+ // old.PrintTable()
+ for p := range old.IterAll() {
+ log.Info("patch", p.Filename, p.Namespace)
+ }
+ newpb, err := old.HttpPostVerbose(myServer(), "check")
+ if err != nil {
+ return err
+ }
+ newpb.PrintTable()
+ */
+ log.Info("do something here to find patches merged to devel")
+ doMergeReport()
return nil
}
@@ -126,7 +130,7 @@ func doPatch() error {
// return doPatchList()
applied := findApplied()
if applied.Len() == 0 {
- log.Info("no patches have to appled to the devel branch yet")
+ log.Info("no patches have been appled to the devel branch yet")
return nil
}
// for patch := range applied.IterAll() {
diff --git a/helperPatches.go b/helperPatches.go
index d6e07d7..19fdc62 100644
--- a/helperPatches.go
+++ b/helperPatches.go
@@ -326,7 +326,7 @@ func findApplied() *forgepb.Patches {
found := forgepb.NewPatches()
for patch := range pset.IterAll() {
- cmd := []string{"git", "merge-base", "--is-ancestor", patch.CommitHash, "devel"}
+ cmd := []string{"git", "merge-base", "--is-ancestor", patch.NewHash, "devel"}
repo := me.forge.Repos.FindByNamespace(patch.Namespace)
_, err := repo.RunStrict(cmd)
if err != nil {