Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2019-01-19 01:53:52 +0300
committerStan Hu <stanhu@gmail.com>2019-01-19 02:54:24 +0300
commit100b050b996072cc302a3a7f8fac850ddaab27d4 (patch)
treeda5eb0b03402cbea10fb4af60945d4943680753a /lib/gitlab/bitbucket_server_import
parent49efb57914b7daac651e0b3fbeb850584be66ce7 (diff)
Fix import handling errors in Bitbucket Server importer
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/20724 removed `Gitlab::Git::RepositoryMirroring::RemoteError`, but this was still being handled in the Bitbucket Server importer and only encountered if some exception other than `Gitlab::Shell::Error` were thrown.
Diffstat (limited to 'lib/gitlab/bitbucket_server_import')
-rw-r--r--lib/gitlab/bitbucket_server_import/importer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/bitbucket_server_import/importer.rb b/lib/gitlab/bitbucket_server_import/importer.rb
index 28cfb46e2d4..dbbedd5dcbe 100644
--- a/lib/gitlab/bitbucket_server_import/importer.rb
+++ b/lib/gitlab/bitbucket_server_import/importer.rb
@@ -132,7 +132,7 @@ module Gitlab
project.repository.fetch_as_mirror(project.import_url, refmap: self.class.refmap, remote_name: REMOTE_NAME)
log_info(stage: 'import_repository', message: 'finished import')
- rescue Gitlab::Shell::Error, Gitlab::Git::RepositoryMirroring::RemoteError => e
+ rescue Gitlab::Shell::Error => e
log_error(stage: 'import_repository', message: 'failed import', error: e.message)
# Expire cache to prevent scenarios such as:
@@ -140,7 +140,7 @@ module Gitlab
# 2. Retried import, repo is broken or not imported but +exists?+ still returns true
project.repository.expire_content_cache if project.repository_exists?
- raise e.message
+ raise
end
# Bitbucket Server keeps tracks of references for open pull requests in