aboutsummaryrefslogtreecommitdiffstats
path: root/services/migrations
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2023-05-11 16:25:46 +0800
committerGitHub <noreply@github.com>2023-05-11 08:25:46 +0000
commitf6e029e6c7849d4361abf7f1d749b5d528364ac4 (patch)
treeaf285dd000dc48e4e94e717cf61a8b2437e99beb /services/migrations
parent58dfaf3a75a097088376a9c221784b3675ac9c48 (diff)
downloadgitea-f6e029e6c7849d4361abf7f1d749b5d528364ac4.tar.gz
gitea-f6e029e6c7849d4361abf7f1d749b5d528364ac4.zip
Make repo migration cancelable and fix various bugs (#24605)
Replace #12917 Close #24601 Close #12845 ![image](https://github.com/go-gitea/gitea/assets/2114189/39378118-064d-40fb-8396-4579ebf33917) ![image](https://github.com/go-gitea/gitea/assets/2114189/faf37418-191c-46a6-90a8-353141e00e2d) ![image](https://github.com/go-gitea/gitea/assets/2114189/fdc8ee4d-125f-4737-9990-89bcdf9eb388) ![image](https://github.com/go-gitea/gitea/assets/2114189/9a3bd2c2-fe20-4011-81f0-990ed869d139) --------- Co-authored-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
Diffstat (limited to 'services/migrations')
-rw-r--r--services/migrations/gitea_uploader.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/services/migrations/gitea_uploader.go b/services/migrations/gitea_uploader.go
index 0eb34b5fe5..ad4293184e 100644
--- a/services/migrations/gitea_uploader.go
+++ b/services/migrations/gitea_uploader.go
@@ -923,9 +923,8 @@ func (g *GiteaLocalUploader) CreateReviews(reviews ...*base.Review) error {
func (g *GiteaLocalUploader) Rollback() error {
if g.repo != nil && g.repo.ID > 0 {
g.gitRepo.Close()
- if err := models.DeleteRepository(g.doer, g.repo.OwnerID, g.repo.ID); err != nil {
- return err
- }
+
+ // do not delete the repository, otherwise the end users won't be able to see the last error message
}
return nil
}