diff options
author | Unknwon <u@gogs.io> | 2016-02-14 19:42:38 -0500 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-02-14 19:42:38 -0500 |
commit | 9adfe453d506fa7ea18b2df3871f72b5c4dc9b7c (patch) | |
tree | be2dc269603c5a360199c676b44c7f74a708b55c | |
parent | 29cd8ac270603ff3a5d02134e7c46ae5006844bd (diff) | |
download | gitea-9adfe453d506fa7ea18b2df3871f72b5c4dc9b7c.tar.gz gitea-9adfe453d506fa7ea18b2df3871f72b5c4dc9b7c.zip |
#2569 delete repo local copy when transfer
Remote repository path is renamed but does not delete
outdated local copy which still has old repository path
as remote.
-rw-r--r-- | .gopmfile | 2 | ||||
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | cmd/web.go | 2 | ||||
-rw-r--r-- | gogs.go | 2 | ||||
-rw-r--r-- | models/repo.go | 6 | ||||
-rw-r--r-- | templates/.VERSION | 2 |
6 files changed, 9 insertions, 7 deletions
@@ -4,7 +4,7 @@ path = github.com/gogits/gogs [deps] github.com/bradfitz/gomemcache = commit:fb1f79c github.com/codegangsta/cli = commit:cf1f63a -github.com/go-macaron/binding = commit:2502aaf +github.com/go-macaron/binding = github.com/go-macaron/cache = commit:5617353 github.com/go-macaron/captcha = commit:8aa5919 github.com/go-macaron/csrf = commit:715bca0 @@ -3,7 +3,7 @@ Gogs - Go Git Service [![Build Status](https://travis-ci.org/gogits/gogs.svg?bra ![](https://github.com/gogits/gogs/blob/master/public/img/gogs-large-resize.png?raw=true) -##### Current version: 0.8.33 +##### Current version: 0.8.34 | Web | UI | Preview | |:-------------:|:-------:|:-------:| diff --git a/cmd/web.go b/cmd/web.go index 279703baaf..f5137e25e1 100644 --- a/cmd/web.go +++ b/cmd/web.go @@ -81,7 +81,7 @@ func checkVersion() { // Check dependency version. checkers := []VerChecker{ {"github.com/go-xorm/xorm", func() string { return xorm.Version }, "0.4.4.1029"}, - {"github.com/go-macaron/binding", binding.Version, "0.1.0"}, + {"github.com/go-macaron/binding", binding.Version, "0.2.1"}, {"github.com/go-macaron/cache", cache.Version, "0.1.2"}, {"github.com/go-macaron/csrf", csrf.Version, "0.0.3"}, {"github.com/go-macaron/i18n", i18n.Version, "0.2.0"}, @@ -17,7 +17,7 @@ import ( "github.com/gogits/gogs/modules/setting" ) -const APP_VER = "0.8.33.0210" +const APP_VER = "0.8.34.0214" func init() { runtime.GOMAXPROCS(runtime.NumCPU()) diff --git a/models/repo.go b/models/repo.go index 46b25a017f..4a8c8f0546 100644 --- a/models/repo.go +++ b/models/repo.go @@ -414,7 +414,7 @@ func (repo *Repository) ComposePayload() *api.PayloadRepo { Email: repo.MustOwner().Email, UserName: repo.MustOwner().Name, }, - Private: repo.IsPrivate, + Private: repo.IsPrivate, DefaultBranch: repo.DefaultBranch, } } @@ -1097,11 +1097,13 @@ func TransferOwnership(u *User, newOwnerName string, repo *Repository) error { return fmt.Errorf("transferRepoAction: %v", err) } - // Change repository directory name. + // Rename remote repository to new path and delete local copy. if err = os.Rename(RepoPath(owner.Name, repo.Name), RepoPath(newOwner.Name, repo.Name)); err != nil { return fmt.Errorf("rename repository directory: %v", err) } + RemoveAllWithNotice("Delete repository local copy", repo.LocalCopyPath()) + // Rename remote wiki repository to new path and delete local copy. wikiPath := WikiPath(owner.Name, repo.Name) if com.IsExist(wikiPath) { RemoveAllWithNotice("Delete repository wiki local copy", repo.LocalWikiPath()) diff --git a/templates/.VERSION b/templates/.VERSION index 90404f1b7c..f2e90b7a85 100644 --- a/templates/.VERSION +++ b/templates/.VERSION @@ -1 +1 @@ -0.8.33.0210
\ No newline at end of file +0.8.34.0214
\ No newline at end of file |