diff --git a/doVerifyUser.go b/doVerifyUser.go new file mode 100644 index 0000000..8c1013c --- /dev/null +++ b/doVerifyUser.go @@ -0,0 +1,55 @@ +package main + +import ( + "go.wit.com/lib/protobuf/gitpb" + "go.wit.com/log" +) + +func doVerifyUser() error { + me.found = new(gitpb.Repos) + all := me.forge.Repos.SortByFullPath() + for all.Scan() { + repo := all.Next() + if repo.IsDirty() { + log.Info(repo.GetGoPath(), "is dirty") + me.found.AppendByGoPath(repo) + continue + } + if repo.ExistsUserBranchRemote() { + } + + if repo.ExistsUserBranch() { + } + if repo.GetMasterBranchName() == repo.GetCurrentBranchName() { + log.Info(repo.GetGoPath(), "is not on master branch") + continue + } + + devel := repo.GetDevelBranchName() + if argv.Verbose { + log.Printf("Start clean devel branch: %s %s\n", repo.GetGoPath(), devel) + } + + // check if devel branch exists in remote repo + if repo.IsBranchRemote(devel) { + if err := doCleanDevelRepo(repo); err != nil { + log.Info(repo.GetGoPath(), "verify clean failed") + } + // can not continue + continue + } + // devel branch is only local + /* + todo: something? + devname := repo.GetDevelBranchName() + if err := requiresGitPush(repo, devname); err != nil { + log.Info(repo.GetGoPath(), "is out of sync with upstream") + return err + } + */ + } + return nil +} + +func verifyRemoteUserBranch(repo *gitpb.Repo) { +} diff --git a/windowPatches.go b/windowPatches.go index 793afb8..ad14e7f 100644 --- a/windowPatches.go +++ b/windowPatches.go @@ -1,6 +1,7 @@ package main import ( + "slices" "strings" "sync" @@ -90,6 +91,7 @@ func (r *patchesWindow) initWindow() { log.Info(err) return } + slices.Reverse(lines) for i, line := range lines { log.Info(i, line) r.addPatchset(line) diff --git a/windowSummary.go b/windowPatchesSummary.go similarity index 97% rename from windowSummary.go rename to windowPatchesSummary.go index a5c4879..5be64f7 100644 --- a/windowSummary.go +++ b/windowPatchesSummary.go @@ -81,7 +81,7 @@ func (r *patchesWindow) submitPatchesBox(box *gui.Node) *patchSummary { log.Info(err) return } - line := "somedate some reason Author: me" + pset.GitAuthorEmail + line := "somedate " + s.reason.String() + " Author: me" + pset.GitAuthorEmail me.patchWin.addPatchset(line) })