keep working on a merge button
This commit is contained in:
parent
642f53dcef
commit
fd41059087
19
doGui.go
19
doGui.go
|
@ -234,10 +234,27 @@ func drawWindow(win *gadgets.BasicWindow) {
|
||||||
_, box := makeStandardReposWindow("repos to merge from user to devel", found)
|
_, box := makeStandardReposWindow("repos to merge from user to devel", found)
|
||||||
hbox := box.Box().Horizontal()
|
hbox := box.Box().Horizontal()
|
||||||
hbox.NewButton("merge all", func() {
|
hbox.NewButton("merge all", func() {
|
||||||
|
win.Disable()
|
||||||
|
defer win.Enable()
|
||||||
all := found.SortByFullPath()
|
all := found.SortByFullPath()
|
||||||
for all.Scan() {
|
for all.Scan() {
|
||||||
repo := all.Next()
|
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
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in New Issue