diff options
Diffstat (limited to 'addRepo.go')
| -rw-r--r-- | addRepo.go | 36 |
1 files changed, 7 insertions, 29 deletions
@@ -1,12 +1,10 @@ package main import ( - "os" "strings" "time" "go.wit.com/lib/gadgets" - "go.wit.com/lib/gui/repostatus" "go.wit.com/log" ) @@ -55,39 +53,23 @@ func (c *controlBox) addRepo(path string) { c.tagDate = gadgets.NewBasicEntry(c.grid, "git tag Date") c.grid.NextRow() - err, repo := repostatus.NewRepoStatusWindow(path) - if err != nil { - log.Info("path did not work", path, err) - return - } - if repo == nil { - log.Info("repo == nil", path, err) - os.Exit(-1) - return - } - c.status = repo - // c.status.SetMainWorkingName("master") - // c.status.SetDevelWorkingName("devel") - // c.status.SetUserWorkingName("jcarr") - c.status.Update() + cbname := repo.GetCurrentBranchName() + cbversion := repo.GetCurrentBranchVersion() + debversion := repo.DebianCurrentVersion() - cbname := c.status.GetCurrentBranchName() - cbversion := c.status.GetCurrentBranchVersion() - debversion := c.status.DebianCurrentVersion() - - if c.status.CheckDirty() { + if repo.CheckDirty() { c.dirtyL.SetText("true") } else { c.dirtyL.SetText("false") } if c.GoPath.String() == "" { - c.GoPath.SetText(c.status.GoPath()) + c.GoPath.SetText(repo.GoPath) } - lasttag := c.status.GetLastTagVersion() + lasttag := repo.GetLastTagVersion() if argv.Release { - debversion = c.status.DebianReleaseVersion() + debversion = repo.DebianReleaseVersion() c.dirtyL.SetText("false") } @@ -99,9 +81,5 @@ func (c *controlBox) addRepo(path string) { tagDate := c.getDateStamp(lasttag) c.tagDate.SetText(tagDate) - if s, ok := c.status.Changed(); ok { - log.Warn("should scan here", s) - } - return } |
