track changes
This commit is contained in:
parent
d406ee5f21
commit
ce4af38e8b
|
@ -6,6 +6,7 @@ package forgepb
|
||||||
import (
|
import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"go.wit.com/lib/config"
|
||||||
"go.wit.com/lib/gui/shell"
|
"go.wit.com/lib/gui/shell"
|
||||||
"go.wit.com/lib/protobuf/gitpb"
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
|
@ -73,12 +74,14 @@ func doCheckDirty(repo *gitpb.Repo) error {
|
||||||
// nothing changed
|
// nothing changed
|
||||||
} else {
|
} else {
|
||||||
log.Info("Repo changed to clean", repo.FullPath)
|
log.Info("Repo changed to clean", repo.FullPath)
|
||||||
|
config.SetChanged("repos", true)
|
||||||
return log.Errorf("%s repo changed to clean", repo.FullPath)
|
return log.Errorf("%s repo changed to clean", repo.FullPath)
|
||||||
// f.SetConfigSave(true)
|
// f.SetConfigSave(true)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if repo.CheckDirty() {
|
if repo.CheckDirty() {
|
||||||
log.Info("Repo changed to dirty", repo.FullPath)
|
log.Info("Repo changed to dirty", repo.FullPath)
|
||||||
|
config.SetChanged("repos", true)
|
||||||
return log.Errorf("%s repo changed to dirty", repo.FullPath)
|
return log.Errorf("%s repo changed to dirty", repo.FullPath)
|
||||||
// f.SetConfigSave(true)
|
// f.SetConfigSave(true)
|
||||||
} else {
|
} else {
|
||||||
|
|
5
rill.go
5
rill.go
|
@ -5,6 +5,7 @@ import (
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"github.com/destel/rill"
|
"github.com/destel/rill"
|
||||||
|
"go.wit.com/lib/config"
|
||||||
"go.wit.com/lib/protobuf/gitpb"
|
"go.wit.com/lib/protobuf/gitpb"
|
||||||
"go.wit.com/log"
|
"go.wit.com/log"
|
||||||
)
|
)
|
||||||
|
@ -81,8 +82,8 @@ func (f *Forge) RillReload() int {
|
||||||
if !repo.IsValidDir() {
|
if !repo.IsValidDir() {
|
||||||
log.Printf("%s %-50s\n", "got an invalid repo in forgepb.RillReload()", repo.GetFullPath())
|
log.Printf("%s %-50s\n", "got an invalid repo in forgepb.RillReload()", repo.GetFullPath())
|
||||||
f.Repos.Delete(repo)
|
f.Repos.Delete(repo)
|
||||||
f.reposSave = true
|
|
||||||
log.Info("reposSave = true")
|
log.Info("reposSave = true")
|
||||||
|
config.SetChanged("repos", true)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
all = append(all, repo)
|
all = append(all, repo)
|
||||||
|
@ -146,8 +147,8 @@ func (f *Forge) RillRepos(rillf func(*gitpb.Repo) error) map[string]*RillStats {
|
||||||
if !repo.IsValidDir() {
|
if !repo.IsValidDir() {
|
||||||
log.Printf("got an invalid repo in forgepb.RillRepos() %-50s\n", repo.GetFullPath())
|
log.Printf("got an invalid repo in forgepb.RillRepos() %-50s\n", repo.GetFullPath())
|
||||||
f.Repos.Delete(repo)
|
f.Repos.Delete(repo)
|
||||||
f.reposSave = true
|
|
||||||
log.Info("reposSave = true")
|
log.Info("reposSave = true")
|
||||||
|
config.SetChanged("repos", true)
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
all = append(all, repo)
|
all = append(all, repo)
|
||||||
|
|
|
@ -14,7 +14,6 @@ type Forge struct {
|
||||||
Repos *gitpb.Repos // the repo protobufs
|
Repos *gitpb.Repos // the repo protobufs
|
||||||
Patchsets *Patchsets // patches that are in progress
|
Patchsets *Patchsets // patches that are in progress
|
||||||
configSave bool // if you need to save the config because things changed
|
configSave bool // if you need to save the config because things changed
|
||||||
reposSave bool // if you need to save the repos file
|
|
||||||
hostname string // your hostname
|
hostname string // your hostname
|
||||||
rillX int // used for Rill()
|
rillX int // used for Rill()
|
||||||
rillY int // used for Rill()
|
rillY int // used for Rill()
|
||||||
|
|
Loading…
Reference in New Issue