check to make sure everything is on the devel branch
This commit is contained in:
parent
79ec3ce469
commit
2c7e15ccfa
|
@ -0,0 +1,10 @@
|
||||||
|
forge
|
||||||
|
|
||||||
|
expiremental work on federated git
|
||||||
|
|
||||||
|
/usr/share/git-gui/lib/tools/
|
||||||
|
.git/config settings for gitgui
|
||||||
|
[gui]
|
||||||
|
wmstate = normal
|
||||||
|
geometry = 931x515+450+130 197 234
|
||||||
|
|
|
@ -62,7 +62,7 @@ func IsValidPatch(p *forgepb.Patch) bool {
|
||||||
func IsAnythingDirty() bool {
|
func IsAnythingDirty() bool {
|
||||||
me.found = new(gitpb.Repos)
|
me.found = new(gitpb.Repos)
|
||||||
findAll() // select all the repos
|
findAll() // select all the repos
|
||||||
doCheckDirty()
|
doCheckDirtyAndConfigSave()
|
||||||
me.found = new(gitpb.Repos)
|
me.found = new(gitpb.Repos)
|
||||||
findDirty()
|
findDirty()
|
||||||
if len(me.found.Repos) == 0 {
|
if len(me.found.Repos) == 0 {
|
||||||
|
|
15
doCommon.go
15
doCommon.go
|
@ -33,7 +33,7 @@ func doGitPull() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func doCheckDirty() {
|
func doCheckDirtyAndConfigSave() {
|
||||||
now := time.Now()
|
now := time.Now()
|
||||||
all := me.found.SortByFullPath()
|
all := me.found.SortByFullPath()
|
||||||
for all.Scan() {
|
for all.Scan() {
|
||||||
|
@ -50,11 +50,22 @@ func doCheckDirty() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// doCobol()
|
|
||||||
log.Info("dirty check took:", shell.FormatDuration(time.Since(now)))
|
log.Info("dirty check took:", shell.FormatDuration(time.Since(now)))
|
||||||
me.forge.SetConfigSave(configSave)
|
me.forge.SetConfigSave(configSave)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func IsEverythingOnDevel() bool {
|
||||||
|
all := me.forge.Repos.SortByFullPath()
|
||||||
|
for all.Scan() {
|
||||||
|
repo := all.Next()
|
||||||
|
if repo.GetCurrentBranchName() != repo.GetDevelBranchName() {
|
||||||
|
log.Info(repo.GetFullPath(), repo.GetCurrentBranchName(), repo.GetDevelBranchName())
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
func doGitReset() {
|
func doGitReset() {
|
||||||
all := me.found.SortByFullPath()
|
all := me.found.SortByFullPath()
|
||||||
for all.Scan() {
|
for all.Scan() {
|
||||||
|
|
2
main.go
2
main.go
|
@ -110,7 +110,7 @@ func main() {
|
||||||
var done bool = false
|
var done bool = false
|
||||||
if argv.Dirty != nil {
|
if argv.Dirty != nil {
|
||||||
findAll() // select all the repos
|
findAll() // select all the repos
|
||||||
doCheckDirty()
|
doCheckDirtyAndConfigSave()
|
||||||
me.found = new(gitpb.Repos)
|
me.found = new(gitpb.Repos)
|
||||||
findDirty()
|
findDirty()
|
||||||
doCobol()
|
doCobol()
|
||||||
|
|
|
@ -192,6 +192,10 @@ func submitPatchesBox(box *gui.Node) *patchSummary {
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
if !IsEverythingOnDevel() {
|
||||||
|
log.Info("You can only apply patches to the devel branch")
|
||||||
|
return
|
||||||
|
}
|
||||||
if IsAnythingDirty() {
|
if IsAnythingDirty() {
|
||||||
log.Info("You can't apply patches when repos are dirty")
|
log.Info("You can't apply patches when repos are dirty")
|
||||||
doCobol()
|
doCobol()
|
||||||
|
|
Loading…
Reference in New Issue