From 617bbe3feec23f2c7cb5c32df8532999fda74203 Mon Sep 17 00:00:00 2001 From: Unknown Date: Fri, 30 May 2014 06:34:24 -0400 Subject: [PATCH] Fix #218 --- .gopmfile | 38 +++++++++++++++++++------------------- cmd/web.go | 4 ++-- gogs.go | 2 +- routers/install.go | 1 + routers/repo/repo.go | 4 +++- templates/VERSION | 2 +- 6 files changed, 27 insertions(+), 24 deletions(-) diff --git a/.gopmfile b/.gopmfile index 35f40b3943..5cfcc20c05 100644 --- a/.gopmfile +++ b/.gopmfile @@ -2,25 +2,25 @@ path = github.com/gogits/gogs [deps] -github.com/Unknwon/cae = -github.com/Unknwon/com = -github.com/Unknwon/goconfig = -github.com/codegangsta/cli = -github.com/go-martini/martini = -github.com/go-sql-driver/mysql = -github.com/go-xorm/core = -github.com/go-xorm/xorm = -github.com/gogits/cache = -github.com/gogits/gfm = -github.com/gogits/git = -github.com/gogits/logs = -github.com/gogits/oauth2 = -github.com/gogits/session = -github.com/juju2013/goldap = -github.com/lib/pq = -github.com/nfnt/resize = -github.com/qiniu/log = -github.com/robfig/cron = +github.com/Unknwon/cae = `commit:a1fa53b` +github.com/Unknwon/com = `commit:019c36f` +github.com/Unknwon/goconfig = `commit:c4e325f` +github.com/codegangsta/cli = `commit:bb91895` +github.com/go-martini/martini = `commit:49411a5` +github.com/go-sql-driver/mysql = `commit:b44cac6` +github.com/go-xorm/core = `commit:267e375` +github.com/go-xorm/xorm = `commit:bd1487b` +github.com/gogits/cache = `commit:f9bb61f` +github.com/gogits/gfm = `commit:40f747a` +github.com/gogits/git = `commit:3d9e771` +github.com/gogits/logs = `commit:0a97a46` +github.com/gogits/oauth2 = `commit:99cbec8` +github.com/gogits/session = `commit:7ab78d4` +github.com/juju2013/goldap = `commit:f4a7f67` +github.com/lib/pq = `commit:529edd9` +github.com/nfnt/resize = `commit:8aee0d9` +github.com/qiniu/log = `commit:891d1cb` +github.com/robfig/cron = `commit:b024fc5` [res] include = templates|public diff --git a/cmd/web.go b/cmd/web.go index d8d9785f35..dc4daca085 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -47,7 +47,7 @@ func checkVersion() { log.Fatal("Fail to read 'templates/VERSION': %v", err) } 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) { - checkVersion() routers.GlobalInit() + checkVersion() m := newMartini() diff --git a/gogs.go b/gogs.go index 6c5b14b40f..86e972579e 100644 --- a/gogs.go +++ b/gogs.go @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.4.0.0528 Alpha" +const APP_VER = "0.4.0.0530 Alpha" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/routers/install.go b/routers/install.go index f173563960..e49595f72b 100644 --- a/routers/install.go +++ b/routers/install.go @@ -47,6 +47,7 @@ func NewServices() { func GlobalInit() { setting.NewConfigContext() log.Trace("Custom path: %s", setting.CustomPath) + log.Trace("Log path: %s", setting.LogRootPath) mailer.NewMailerContext() models.LoadModelsConfig() models.LoadRepoConfig() diff --git a/routers/repo/repo.go b/routers/repo/repo.go index a5a0b2aa26..286f558b6e 100644 --- a/routers/repo/repo.go +++ b/routers/repo/repo.go @@ -80,7 +80,9 @@ func MigratePost(ctx *middleware.Context, form auth.MigrateRepoForm) { 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, form.Mirror, url) if err == nil { diff --git a/templates/VERSION b/templates/VERSION index 2075872995..61da4c61ad 100644 --- a/templates/VERSION +++ b/templates/VERSION @@ -1 +1 @@ -0.4.0.0528 Alpha \ No newline at end of file +0.4.0.0530 Alpha \ No newline at end of file