Browse Source

Fix #218

pull/228/head
Unknown 11 years ago
parent
commit
617bbe3fee
  1. 38
      .gopmfile
  2. 4
      cmd/web.go
  3. 2
      gogs.go
  4. 1
      routers/install.go
  5. 4
      routers/repo/repo.go
  6. 2
      templates/VERSION

38
.gopmfile

@ -2,25 +2,25 @@
path = github.com/gogits/gogs path = github.com/gogits/gogs
[deps] [deps]
github.com/Unknwon/cae = github.com/Unknwon/cae = `commit:a1fa53b`
github.com/Unknwon/com = github.com/Unknwon/com = `commit:019c36f`
github.com/Unknwon/goconfig = github.com/Unknwon/goconfig = `commit:c4e325f`
github.com/codegangsta/cli = github.com/codegangsta/cli = `commit:bb91895`
github.com/go-martini/martini = github.com/go-martini/martini = `commit:49411a5`
github.com/go-sql-driver/mysql = github.com/go-sql-driver/mysql = `commit:b44cac6`
github.com/go-xorm/core = github.com/go-xorm/core = `commit:267e375`
github.com/go-xorm/xorm = github.com/go-xorm/xorm = `commit:bd1487b`
github.com/gogits/cache = github.com/gogits/cache = `commit:f9bb61f`
github.com/gogits/gfm = github.com/gogits/gfm = `commit:40f747a`
github.com/gogits/git = github.com/gogits/git = `commit:3d9e771`
github.com/gogits/logs = github.com/gogits/logs = `commit:0a97a46`
github.com/gogits/oauth2 = github.com/gogits/oauth2 = `commit:99cbec8`
github.com/gogits/session = github.com/gogits/session = `commit:7ab78d4`
github.com/juju2013/goldap = github.com/juju2013/goldap = `commit:f4a7f67`
github.com/lib/pq = github.com/lib/pq = `commit:529edd9`
github.com/nfnt/resize = github.com/nfnt/resize = `commit:8aee0d9`
github.com/qiniu/log = github.com/qiniu/log = `commit:891d1cb`
github.com/robfig/cron = github.com/robfig/cron = `commit:b024fc5`
[res] [res]
include = templates|public include = templates|public

4
cmd/web.go

@ -47,7 +47,7 @@ func checkVersion() {
log.Fatal("Fail to read 'templates/VERSION': %v", err) log.Fatal("Fail to read 'templates/VERSION': %v", err)
} }
if string(data) != setting.AppVer { if string(data) != setting.AppVer {
log.Fatal("Binary and static file version does not match, did you forget to recompile?") log.Fatal("Binary and template file version does not match, did you forget to recompile?")
} }
} }
@ -64,8 +64,8 @@ func newMartini() *martini.ClassicMartini {
} }
func runWeb(*cli.Context) { func runWeb(*cli.Context) {
checkVersion()
routers.GlobalInit() routers.GlobalInit()
checkVersion()
m := newMartini() m := newMartini()

2
gogs.go

@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/modules/setting"
) )
const APP_VER = "0.4.0.0528 Alpha" const APP_VER = "0.4.0.0530 Alpha"
func init() { func init() {
runtime.GOMAXPROCS(runtime.NumCPU()) runtime.GOMAXPROCS(runtime.NumCPU())

1
routers/install.go

@ -47,6 +47,7 @@ func NewServices() {
func GlobalInit() { func GlobalInit() {
setting.NewConfigContext() setting.NewConfigContext()
log.Trace("Custom path: %s", setting.CustomPath) log.Trace("Custom path: %s", setting.CustomPath)
log.Trace("Log path: %s", setting.LogRootPath)
mailer.NewMailerContext() mailer.NewMailerContext()
models.LoadModelsConfig() models.LoadModelsConfig()
models.LoadRepoConfig() models.LoadRepoConfig()

4
routers/repo/repo.go

@ -80,7 +80,9 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) {
return return
} }
url := strings.Replace(form.Url, "://", fmt.Sprintf("://%s:%s@", form.AuthUserName, form.AuthPasswd), 1) authStr := strings.Replace(fmt.Sprintf("://%s:%s",
form.AuthUserName, form.AuthPasswd), "@", "%40", -1)
url := strings.Replace(form.Url, "://", authStr, 1) + "@"
repo, err := models.MigrateRepository(ctx.User, form.RepoName, form.Description, form.Private, repo, err := models.MigrateRepository(ctx.User, form.RepoName, form.Description, form.Private,
form.Mirror, url) form.Mirror, url)
if err == nil { if err == nil {

2
templates/VERSION

@ -1 +1 @@
0.4.0.0528 Alpha 0.4.0.0530 Alpha
Loading…
Cancel
Save