blob: 74f926b2b3e053ee2a2f81e38d6c515098e2257c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
// This is a simple example
package main
import (
"go.wit.com/log"
"go.wit.com/gui/gadgets/repostatus"
)
func (r *repo) newScan() bool {
if r.status == nil {
log.Warn("repo.status = nil. not initialized for some reason")
return false
}
// r.scan()
if repostatus.VerifyLocalGoRepo(r.getPath()) {
log.Warn("repo actually exists", r.getPath())
} else {
log.Warn("repo does not exist", r.getPath())
return false
}
mn := r.status.GetMasterName()
mv := r.status.GetMasterVersion()
r.masterVersion.Set(mn + "\n" + mv)
dn := r.status.GetDevelName()
dv := r.status.GetDevelVersion()
r.develVersion.Set(dn + "\n" + dv)
un := r.status.GetUserName()
uv := r.status.GetUserVersion()
r.jcarrVersion.Set(un + "\n" + uv)
cbname := r.status.GetCurrentBranchName()
cbversion := r.status.GetCurrentBranchVersion()
ltversion := r.status.GetLastTagVersion()
r.lastLabel.Set(cbname + "\n" + cbversion)
r.vLabel.Set(cbname + "\n" + ltversion)
if r.status.CheckDirty() {
log.Warn("CheckDirty() true")
r.dirtyLabel.Set("dirty")
return false
}
log.Warn("CheckDirty() no")
r.dirtyLabel.Set("not dirty")
if r.status.CheckBranches() {
log.Warn("Branches are Perfect")
r.dirtyLabel.SetText("PEFECT")
return true
} else {
log.Warn("Branches are not Perfect")
r.dirtyLabel.SetText("merge")
}
return false
}
|