From afe21d3c626200fa647f9597f6037535d2d8554c Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sun, 1 Dec 2024 00:48:07 -0600 Subject: change to use gitpb --- addRepo.go | 36 +++++++----------------------------- 1 file changed, 7 insertions(+), 29 deletions(-) (limited to 'addRepo.go') diff --git a/addRepo.go b/addRepo.go index f2555f7..f65c688 100644 --- a/addRepo.go +++ b/addRepo.go @@ -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 } -- cgit v1.2.3