Merge branch 'master' of github.com:gogits/gogs into dev

This commit is contained in:
Unknown 2014-06-29 16:32:28 -04:00
commit 269da8fe7a
2 changed files with 2 additions and 13 deletions

View File

@ -9,6 +9,7 @@ import (
"os" "os"
"os/exec" "os/exec"
"path" "path"
"path/filepath"
"strconv" "strconv"
"strings" "strings"
@ -30,7 +31,7 @@ var CmdServ = cli.Command{
func setup(logPath string) { func setup(logPath string) {
setting.NewConfigContext() setting.NewConfigContext()
log.NewGitLogger(path.Join(setting.LogRootPath, logPath)) log.NewGitLogger(filepath.Join(setting.LogRootPath, logPath))
models.LoadModelsConfig() models.LoadModelsConfig()
if models.UseSQLite3 { if models.UseSQLite3 {
@ -166,7 +167,6 @@ func runServ(k *cli.Context) {
return return
} }
//models.SetRepoEnvs(user.Id, user.Name, repoName, repoUserName)
uuid := uuid.NewV4().String() uuid := uuid.NewV4().String()
os.Setenv("uuid", uuid) os.Setenv("uuid", uuid)

View File

@ -35,10 +35,6 @@ func runUpdate(c *cli.Context) {
log.GitLogger.Fatal("refName is empty, shouldn't use") log.GitLogger.Fatal("refName is empty, shouldn't use")
} }
//userName := os.Getenv("userName")
//userId, _ := strconv.ParseInt(os.Getenv("userId"), 10, 64)
//repoUserName := os.Getenv("repoUserName")
//repoName := os.Getenv("repoName")
uuid := os.Getenv("uuid") uuid := os.Getenv("uuid")
task := models.UpdateTask{ task := models.UpdateTask{
@ -48,14 +44,7 @@ func runUpdate(c *cli.Context) {
NewCommitId: args[2], NewCommitId: args[2],
} }
log.GitLogger.Error("%v", task)
if err := models.AddUpdateTask(&task); err != nil { if err := models.AddUpdateTask(&task); err != nil {
log.GitLogger.Fatal(err.Error()) log.GitLogger.Fatal(err.Error())
} }
/*if err := models.Update(args[0], args[1], args[2], userName, repoUserName, repoName, userId); err != nil {
log.GitLogger.Fatal(err.Error())
}*/
//setEnvs(args[0], args[1], args[2], userName, repoUserName, repoName, userId)
} }