keep working on a merge button

This commit is contained in:
Jeff Carr 2025-02-22 18:55:46 -06:00
parent 642f53dcef
commit fd41059087
1 changed files with 18 additions and 1 deletions

View File

@ -234,10 +234,27 @@ func drawWindow(win *gadgets.BasicWindow) {
_, box := makeStandardReposWindow("repos to merge from user to devel", found)
hbox := box.Box().Horizontal()
hbox.NewButton("merge all", func() {
win.Disable()
defer win.Enable()
all := found.SortByFullPath()
for all.Scan() {
repo := all.Next()
log.Info("todo: merge here on", repo.GetGoPath())
if repo.CheckDirty() {
log.Info("repo is dirty", repo.GetGoPath())
continue
}
log.Info("Starting merge on", repo.GetGoPath())
if repo.CheckoutDevel() {
log.Info("checkout devel failed", repo.GetGoPath())
return
}
if _, err := repo.MergeToDevel(); err != nil {
log.Info("merge from user failed", repo.GetGoPath(), err)
// log.Info(strings.Join(r.Stdout, "\n"))
// log.Info(strings.Join(r.Stderr, "\n"))
return
}
}
})
})