summaryrefslogtreecommitdiff
path: root/repolist.go
diff options
context:
space:
mode:
Diffstat (limited to 'repolist.go')
-rw-r--r--repolist.go18
1 files changed, 7 insertions, 11 deletions
diff --git a/repolist.go b/repolist.go
index 2f2e354..da0adbf 100644
--- a/repolist.go
+++ b/repolist.go
@@ -13,6 +13,9 @@ import (
)
func (r *repo) String() string {
+ if r.status == nil {
+ return r.path
+ }
return r.status.String()
}
@@ -129,19 +132,11 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
newRepo := new(repo)
- path = strings.Trim(path, "/") // trim any extranous '/' chars put in the config file by the user
if path == "" {
log.Warn("addRepo() got empty path", path, master, devel, user)
return
}
- if repostatus.VerifyLocalGoRepo(path) {
- log.Verbose("newRepo actually exists", newRepo.getPath())
- } else {
- log.Warn("repostatus.VerifyLocalGoRepo() failed for for", path, master, devel, user)
- return
- }
-
newRepo.path = path
newRepo.pLabel = grid.NewLabel(path)
@@ -163,9 +158,10 @@ func addRepo(grid *gui.Node, path string, master string, devel string, user stri
})
newRepo.status = repostatus.NewRepoStatusWindow(newRepo.path)
+ if newRepo.status == nil {
+ log.Warn("something is wrong with", path)
+ os.Exit(0)
+ }
newRepo.hidden = false
- newRepo.status.SetMainWorkingName(master)
- newRepo.status.SetDevelWorkingName(devel)
- newRepo.status.SetUserWorkingName(user)
me.allrepos[path] = newRepo
}