lots of things broken
Signed-off-by: Jeff Carr <jcarr@wit.com>
This commit is contained in:
parent
7a283a1da6
commit
e7257a919d
6
draw.go
6
draw.go
|
@ -348,7 +348,7 @@ func (rs *RepoStatus) setGitCommands() {
|
|||
tmp = append(tmp, s)
|
||||
}
|
||||
|
||||
rs.versionCmdOutput.SetText(strings.Join(tmp, "\n"))
|
||||
rs.versionCmdOutput.SetValue(strings.Join(tmp, "\n"))
|
||||
}
|
||||
|
||||
func (rs *RepoStatus) setMergeDevelCommands() {
|
||||
|
@ -375,7 +375,7 @@ func (rs *RepoStatus) setMergeDevelCommands() {
|
|||
tmp = append(tmp, s)
|
||||
}
|
||||
|
||||
rs.versionCmdOutput.SetText(strings.Join(tmp, "\n"))
|
||||
rs.versionCmdOutput.SetValue(strings.Join(tmp, "\n"))
|
||||
}
|
||||
|
||||
func (rs *RepoStatus) setMergeUserCommands() {
|
||||
|
@ -402,5 +402,5 @@ func (rs *RepoStatus) setMergeUserCommands() {
|
|||
tmp = append(tmp, s)
|
||||
}
|
||||
|
||||
rs.versionCmdOutput.SetText(strings.Join(tmp, "\n"))
|
||||
rs.versionCmdOutput.SetValue(strings.Join(tmp, "\n"))
|
||||
}
|
||||
|
|
18
git.go
18
git.go
|
@ -32,14 +32,14 @@ func (rs *RepoStatus) GetLastTagVersion() string {
|
|||
func (rs *RepoStatus) getCurrentBranchName() string {
|
||||
out := run(rs.repopath, "git", "branch --show-current")
|
||||
log.Warn("getCurrentBranchName() =", out)
|
||||
rs.currentBranch.SetText(out)
|
||||
rs.currentBranch.SetValue(out)
|
||||
return out
|
||||
}
|
||||
|
||||
func (rs *RepoStatus) getCurrentBranchVersion() string {
|
||||
out := run(rs.repopath, "git", "describe --tags")
|
||||
log.Warn("getCurrentBranchVersion()", out)
|
||||
rs.currentVersion.SetText(out)
|
||||
rs.currentVersion.SetValue(out)
|
||||
return out
|
||||
}
|
||||
|
||||
|
@ -51,7 +51,7 @@ func (rs *RepoStatus) getLastTagVersion() string {
|
|||
lastreal := "describe --tags " + out
|
||||
// out = run(r.path, "git", "describe --tags c871d5ecf051a7dc4e3a77157cdbc0a457eb9ae1")
|
||||
out = run(rs.repopath, "git", lastreal)
|
||||
rs.lasttag.SetText(out)
|
||||
rs.lasttag.SetValue(out)
|
||||
rs.tagsDrop.SetText(out)
|
||||
// rs.lastLabel.SetText(out)
|
||||
return out
|
||||
|
@ -109,17 +109,17 @@ func (rs *RepoStatus) CheckDirty() bool {
|
|||
log.Warn("CheckDirty() out =", out)
|
||||
log.Warn("CheckDirty() err =", err)
|
||||
log.Error(err, "CheckDirty() error")
|
||||
rs.dirtyLabel.SetText("error")
|
||||
rs.dirtyLabel.SetValue("error")
|
||||
return true
|
||||
}
|
||||
if b {
|
||||
log.Warn("CheckDirty() b =", b, "path =", path, "out =", out)
|
||||
log.Warn("CheckDirty() no", rs.repopath)
|
||||
rs.dirtyLabel.SetText("no")
|
||||
rs.dirtyLabel.SetValue("no")
|
||||
return false
|
||||
}
|
||||
log.Warn("CheckDirty() true", rs.repopath)
|
||||
rs.dirtyLabel.SetText("dirty")
|
||||
rs.dirtyLabel.SetValue("dirty")
|
||||
return true
|
||||
|
||||
}
|
||||
|
@ -147,11 +147,11 @@ func (rs *RepoStatus) checkoutBranch(level string, branch string) {
|
|||
|
||||
switch level {
|
||||
case "master":
|
||||
rs.masterBranchVersion.SetText(realversion)
|
||||
rs.masterBranchVersion.SetValue(realversion)
|
||||
case "devel":
|
||||
rs.develBranchVersion.SetText(realversion)
|
||||
rs.develBranchVersion.SetValue(realversion)
|
||||
case "user":
|
||||
rs.userBranchVersion.SetText(realversion)
|
||||
rs.userBranchVersion.SetValue(realversion)
|
||||
default:
|
||||
}
|
||||
}
|
||||
|
|
2
timer.go
2
timer.go
|
@ -15,5 +15,5 @@ func (ls *RepoStatus) SetSpeedActual(s string) {
|
|||
if !ls.Ready() {
|
||||
return
|
||||
}
|
||||
ls.speedActual.SetText(s)
|
||||
ls.speedActual.SetValue(s)
|
||||
}
|
||||
|
|
17
update.go
17
update.go
|
@ -17,19 +17,12 @@ func (rs *RepoStatus) Update() {
|
|||
log.Log(WARN, "Update() START")
|
||||
duration := timeFunction(func() {
|
||||
// do things that are safe even if the git tree is dirty
|
||||
log.Warn("path.SetText()")
|
||||
rs.path.SetText(rs.repopath)
|
||||
log.Warn("getCurrentBranchName()")
|
||||
rs.path.SetValue(rs.repopath)
|
||||
rs.getCurrentBranchName()
|
||||
log.Warn("set window Title()")
|
||||
rs.window.Title(rs.repopath + " GO repo Details")
|
||||
log.Warn("getCurrentBranchVersion()")
|
||||
rs.getCurrentBranchVersion()
|
||||
log.Warn("getLastTagVersion()")
|
||||
rs.getLastTagVersion()
|
||||
log.Warn("populateTags()")
|
||||
rs.populateTags()
|
||||
log.Warn("CheckDirty()")
|
||||
rs.CheckDirty()
|
||||
|
||||
if rs.dirtyLabel.String() != "no" {
|
||||
|
@ -67,14 +60,14 @@ func (rs *RepoStatus) setSpeed(duration time.Duration) {
|
|||
log.Log(WARN, "can't actually warn")
|
||||
return
|
||||
}
|
||||
rs.speedActual.SetText(s)
|
||||
rs.speedActual.SetValue(s)
|
||||
|
||||
if duration > 500*time.Millisecond {
|
||||
rs.speed.SetText("SLOW")
|
||||
rs.speed.SetValue("SLOW")
|
||||
} else if duration > 100*time.Millisecond {
|
||||
rs.speed.SetText("OK")
|
||||
rs.speed.SetValue("OK")
|
||||
} else {
|
||||
rs.speed.SetText("FAST")
|
||||
rs.speed.SetValue("FAST")
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue