remove mirroring. rethink this after refactor
This commit is contained in:
parent
43385fcb43
commit
7d5786782c
26
newRepo.go
26
newRepo.go
|
@ -100,25 +100,13 @@ func (r *RepoList) AddRepo(pb *gitpb.Repo) (*RepoRow, error) {
|
||||||
func (r *RepoList) makeAutotypistView(newRepo *RepoRow) {
|
func (r *RepoList) makeAutotypistView(newRepo *RepoRow) {
|
||||||
grid := r.reposgrid
|
grid := r.reposgrid
|
||||||
|
|
||||||
newRepo.lastTag = newRepo.Status.MirrorLastTag()
|
newRepo.lastTag = grid.NewLabel("")
|
||||||
grid.Append(newRepo.lastTag)
|
newRepo.masterVersion = grid.NewLabel("")
|
||||||
|
newRepo.develVersion = grid.NewLabel("")
|
||||||
newRepo.masterVersion = newRepo.Status.MirrorMasterVersion()
|
newRepo.userVersion = grid.NewLabel("")
|
||||||
grid.Append(newRepo.masterVersion)
|
newRepo.gitState = grid.NewLabel("")
|
||||||
|
newRepo.currentName = grid.NewLabel("")
|
||||||
newRepo.develVersion = newRepo.Status.MirrorDevelVersion()
|
newRepo.currentVersion = grid.NewLabel("")
|
||||||
grid.Append(newRepo.develVersion)
|
|
||||||
|
|
||||||
newRepo.userVersion = newRepo.Status.MirrorUserVersion()
|
|
||||||
grid.Append(newRepo.userVersion)
|
|
||||||
|
|
||||||
newRepo.gitState = newRepo.Status.MirrorGitState()
|
|
||||||
grid.Append(newRepo.gitState)
|
|
||||||
|
|
||||||
newRepo.currentName = newRepo.Status.MirrorCurrentName()
|
|
||||||
grid.Append(newRepo.currentName)
|
|
||||||
newRepo.currentVersion = newRepo.Status.MirrorCurrentVersion()
|
|
||||||
grid.Append(newRepo.currentVersion)
|
|
||||||
|
|
||||||
newRepo.endBox = grid.NewHorizontalBox("HBOX")
|
newRepo.endBox = grid.NewHorizontalBox("HBOX")
|
||||||
newRepo.endBox.NewButton("Configure", func() {
|
newRepo.endBox.NewButton("Configure", func() {
|
||||||
|
|
29
scan.go
29
scan.go
|
@ -36,7 +36,7 @@ func (r *RepoList) ScanRepositories() (int, string) {
|
||||||
me.shownCount.SetText(tmp)
|
me.shownCount.SetText(tmp)
|
||||||
me.duration.SetText(s)
|
me.duration.SetText(s)
|
||||||
|
|
||||||
log.Log(REPO, "Scanned", i, "repositories.", total, "changes in", s)
|
log.Info("Scanned", i, "repositories.", total, "changes in", s)
|
||||||
return i, s
|
return i, s
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,6 +50,33 @@ func (r *RepoRow) NewScan() int {
|
||||||
// run the repostatus update
|
// run the repostatus update
|
||||||
r.Status.Update()
|
r.Status.Update()
|
||||||
|
|
||||||
|
if r.lastTag != nil {
|
||||||
|
if r.pb != nil {
|
||||||
|
r.lastTag.SetLabel(r.pb.GetLastTag())
|
||||||
|
} else {
|
||||||
|
log.Info("r.pb was nil")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// r.masterVersion.SetLabel(r.pb.GetMasterVersion())
|
||||||
|
// r.develVersion.SetLabel(r.pb.GetDevelVersion())
|
||||||
|
// r.userVersion.SetLabel(r.pb.GetUserVersion())
|
||||||
|
// r.gitState.SetLabel(r.Status.GetState())
|
||||||
|
// r.currentName.SetLabel(r.Status.CurrentBranchName())
|
||||||
|
// r.currentVersion.SetLabel(r.Status.CurrentBranchVersion())
|
||||||
|
|
||||||
|
tags := []string{"%(objectname)", "%(creatordate)", "%(*authordate)", "%(refname)", "%(subject)"}
|
||||||
|
format := strings.Join(tags, "_,,,_")
|
||||||
|
cmd := []string{"git", "for-each-ref", "--sort=taggerdate", "--format", format}
|
||||||
|
// log.Info("RUNNING:", strings.Join(cmd, " "))
|
||||||
|
result := r.pb.RunQuiet(cmd)
|
||||||
|
if result.Error != nil {
|
||||||
|
log.Warn("git for-each-ref error:", result.Error)
|
||||||
|
}
|
||||||
|
for i, line := range result.Stdout {
|
||||||
|
log.Info(i, line)
|
||||||
|
}
|
||||||
|
|
||||||
if me.hideFunction == nil {
|
if me.hideFunction == nil {
|
||||||
// application didn't register a hide function
|
// application didn't register a hide function
|
||||||
// always show everything in that case
|
// always show everything in that case
|
||||||
|
|
Loading…
Reference in New Issue