From 8bed017557c43701d92ca3e571761cd310ed8c83 Mon Sep 17 00:00:00 2001 From: Unknown Date: Sat, 19 Apr 2014 22:13:22 -0400 Subject: [PATCH] Add build tag enable prompt --- conf/app.ini | 2 +- modules/base/conf.go | 6 ++++++ modules/middleware/repo.go | 1 + routers/install.go | 5 ++++- templates/repo/single_list.tmpl | 2 +- 5 files changed, 13 insertions(+), 3 deletions(-) diff --git a/conf/app.ini b/conf/app.ini index eb3d635f3..ca0bfa84d 100644 --- a/conf/app.ini +++ b/conf/app.ini @@ -22,7 +22,7 @@ CERT_FILE = cert.pem KEY_FILE = key.pem [database] -; Either "mysql", "postgres" or "sqlite3"(binary release only), it's your choice +; Either "mysql", "postgres" or "sqlite3", it's your choice DB_TYPE = mysql HOST = 127.0.0.1:3306 NAME = gogs diff --git a/modules/base/conf.go b/modules/base/conf.go index 9dccc48f9..720b86108 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -174,6 +174,12 @@ func newLogService() { func newCacheService() { CacheAdapter = Cfg.MustValue("cache", "ADAPTER", "memory") + if cache.EnableRedis { + log.Info("Redis Enabled") + } + if cache.EnableMemcache { + log.Info("Memcache Enabled") + } switch CacheAdapter { case "memory": diff --git a/modules/middleware/repo.go b/modules/middleware/repo.go index 07395df96..9a23d6759 100644 --- a/modules/middleware/repo.go +++ b/modules/middleware/repo.go @@ -201,6 +201,7 @@ func RepoAssignment(redirect bool, args ...bool) martini.Handler { // repo is bare and display enable if displayBare && ctx.Repo.Repository.IsBare { + log.Debug("Bare repository: %s", ctx.Repo.RepoLink) ctx.HTML(200, "repo/single_bare") return } diff --git a/routers/install.go b/routers/install.go index 81b164038..12182ad30 100644 --- a/routers/install.go +++ b/routers/install.go @@ -49,6 +49,7 @@ func GlobalInit() { models.LoadModelsConfig() models.LoadRepoConfig() models.NewRepoContext() + NewServices() if base.InstallLock { if err := models.NewEngine(); err != nil { @@ -56,9 +57,11 @@ func GlobalInit() { } models.HasEngine = true + if models.EnableSQLite3 { + log.Info("SQLite3 Enabled") + } cron.NewCronContext() } - NewServices() checkRunMode() } diff --git a/templates/repo/single_list.tmpl b/templates/repo/single_list.tmpl index b12687bd7..7b6c6e5e9 100644 --- a/templates/repo/single_list.tmpl +++ b/templates/repo/single_list.tmpl @@ -36,7 +36,7 @@ - {{$commit.Message}} + {{$commit.Message}} {{TimeSince $commit.Committer.When}}