diff options
author | Robert Speicher <rspeicher@gmail.com> | 2019-01-23 23:49:42 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-01-23 23:49:42 +0000 |
commit | de3af288ce4e478acf8ad7a89690e7215a2bf6a0 (patch) | |
tree | 6bf3fca388dbcfa404401a97ea28622051717692 /lib | |
parent | 3effc289ca2765a45867525ba34491008ff6cf04 (diff) | |
parent | 100b050b996072cc302a3a7f8fac850ddaab27d4 (diff) | |
download | gitlab-ce-de3af288ce4e478acf8ad7a89690e7215a2bf6a0.tar.gz |
Merge branch 'sh-remove-bitbucket-mirror-constant' into 'master'
Fix import handling errors in Bitbucket Server importer
See merge request gitlab-org/gitlab-ce!24499
Diffstat (limited to 'lib')
-rw-r--r-- | lib/gitlab/bitbucket_server_import/importer.rb | 4 |
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 |