Skip to content
Snippets Groups Projects
Commit ff44198e authored by James Lopez's avatar James Lopez
Browse files

few fixes after refactoring the whole UI stuff

parent b53ed848
No related branches found
No related tags found
No related merge requests found
Loading
@@ -14,7 +14,7 @@ class Import::GitlabProjectsController < Import::BaseController
Loading
@@ -14,7 +14,7 @@ class Import::GitlabProjectsController < Import::BaseController
   
@project = Gitlab::ImportExport::ProjectCreator.new(project_params[:namespace_id], @project = Gitlab::ImportExport::ProjectCreator.new(project_params[:namespace_id],
current_user, current_user,
File.expand_path(params[:file].path), File.expand_path(project_params[:file].path),
project_params[:path]).execute project_params[:path]).execute
   
if @project.saved? if @project.saved?
Loading
@@ -33,7 +33,7 @@ class Import::GitlabProjectsController < Import::BaseController
Loading
@@ -33,7 +33,7 @@ class Import::GitlabProjectsController < Import::BaseController
private private
   
def file_is_valid? def file_is_valid?
params[:file].respond_to?(:read) && params[:file].content_type == 'application/x-gzip' project_params[:file].respond_to?(:read) && project_params[:file].content_type == 'application/x-gzip'
end end
   
def verify_project_and_namespace_access def verify_project_and_namespace_access
Loading
@@ -52,7 +52,7 @@ class Import::GitlabProjectsController < Import::BaseController
Loading
@@ -52,7 +52,7 @@ class Import::GitlabProjectsController < Import::BaseController
   
def project_params def project_params
params.permit( params.permit(
:path, :namespace_id, :path, :namespace_id, :file
) )
end end
end end
Loading
@@ -7,7 +7,7 @@
Loading
@@ -7,7 +7,7 @@
Forking in progress. Forking in progress.
- else - else
Import in progress. Import in progress.
- unless @project.forked? - unless @project.forked? || @project.gitlab_project_import?
%p.monospace git clone --bare #{@project.safe_import_url} %p.monospace git clone --bare #{@project.safe_import_url}
%p Please wait while we import the repository for you. Refresh at will. %p Please wait while we import the repository for you. Refresh at will.
:javascript :javascript
Loading
Loading
Loading
@@ -15,8 +15,6 @@ module Gitlab
Loading
@@ -15,8 +15,6 @@ module Gitlab
if check_version! && [project_tree, repo_restorer, wiki_restorer, uploads_restorer].all?(&:restore) if check_version! && [project_tree, repo_restorer, wiki_restorer, uploads_restorer].all?(&:restore)
project_tree.restored_project project_tree.restored_project
else else
project_tree.restored_project.destroy if project_tree.restored_project
raise Projects::ImportService::Error.new, @shared.errors.join(', ') raise Projects::ImportService::Error.new, @shared.errors.join(', ')
end end
end end
Loading
Loading
Loading
@@ -57,10 +57,10 @@ module Gitlab
Loading
@@ -57,10 +57,10 @@ module Gitlab
   
author = @relation_hash.delete('author') author = @relation_hash.delete('author')
   
update_note_for_missing_author(author['name']) if missing_author? update_note_for_missing_author(author['name']) if missing_author?(old_author_id)
end end
   
def missing_author? def missing_author?(old_author_id)
!admin_user? || @members_mapper.missing_author_ids.include?(old_author_id) !admin_user? || @members_mapper.missing_author_ids.include?(old_author_id)
end end
   
Loading
Loading
Loading
@@ -17,13 +17,13 @@ module Gitlab
Loading
@@ -17,13 +17,13 @@ module Gitlab
error_out(error.message, caller[0].dup) error_out(error.message, caller[0].dup)
@errors << error.message @errors << error.message
# Debug: # Debug:
Rails.logger.error(error.backtrace) logger.error(error.backtrace)
end end
   
private private
   
def error_out(message, caller) def error_out(message, caller)
Rails.logger.error("Import/Export error raised on #{caller}: #{message}") logger.error("Import/Export error raised on #{caller}: #{message}")
end end
end end
end end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment