summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorUnknwon <joe2010xtmf@163.com>2015-01-02 12:47:33 +0800
committerUnknwon <joe2010xtmf@163.com>2015-01-02 12:47:33 +0800
commit3ea1443885f274c9b3b952480c30ac5ec2195c5d (patch)
treedd7a36a11c31661cd3b71e4a8fb457a2fe6b1025
parentb6272d180343d8081941eb56f22fed5ffc830a7e (diff)
downloadgitea-3ea1443885f274c9b3b952480c30ac5ec2195c5d.tar.gz
gitea-3ea1443885f274c9b3b952480c30ac5ec2195c5d.zip
work on #784
-rw-r--r--gogs.go2
-rw-r--r--models/repo.go4
-rw-r--r--templates/.VERSION2
3 files changed, 5 insertions, 3 deletions
diff --git a/gogs.go b/gogs.go
index c3038aad6d..0deb458585 100644
--- a/gogs.go
+++ b/gogs.go
@@ -17,7 +17,7 @@ import (
"github.com/gogits/gogs/modules/setting"
)
-const APP_VER = "0.5.10.1229 Beta"
+const APP_VER = "0.5.10.0102 Beta"
func init() {
runtime.GOMAXPROCS(runtime.NumCPU())
diff --git a/models/repo.go b/models/repo.go
index 50b2b3fc25..925f199483 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -829,6 +829,8 @@ func TransferOwnership(u *User, newOwner string, repo *Repository) error {
// ChangeRepositoryName changes all corresponding setting from old repository name to new one.
func ChangeRepositoryName(userName, oldRepoName, newRepoName string) (err error) {
+ userName = strings.ToLower(userName)
+ oldRepoName = strings.ToLower(oldRepoName)
newRepoName = strings.ToLower(newRepoName)
if !IsLegalName(newRepoName) {
return ErrRepoNameIllegal
@@ -836,7 +838,7 @@ func ChangeRepositoryName(userName, oldRepoName, newRepoName string) (err error)
// Update accesses.
accesses := make([]Access, 0, 10)
- if err = x.Find(&accesses, &Access{RepoName: strings.ToLower(userName + "/" + oldRepoName)}); err != nil {
+ if err = x.Find(&accesses, &Access{RepoName: userName + "/" + oldRepoName}); err != nil {
return err
}
diff --git a/templates/.VERSION b/templates/.VERSION
index ea5da339f7..2c20d8b2af 100644
--- a/templates/.VERSION
+++ b/templates/.VERSION
@@ -1 +1 @@
-0.5.10.1229 Beta \ No newline at end of file
+0.5.10.0102 Beta \ No newline at end of file