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:
authorJames Lopez <james@jameslopez.es>2016-07-01 14:03:37 +0300
committerJames Lopez <james@jameslopez.es>2016-07-19 10:59:54 +0300
commitbf1ea8c6fe34abe7bde8913f6a6d88eff4d77fc3 (patch)
tree7efe0308af51ae90f2eb5044757614bb9828b2f9 /lib/gitlab
parent78cd5b8d0e0a69d7b1681bf98b17ccb7a22dde5f (diff)
Squashed - fix encoding issue
WIP - trying to replicate UTF-8 error fix spec fixing encoding issue and another spec, to do with MR diffs fix issue and spec failure Add changelog and bumped up I/E version fix spec based on feedback - omitted target project
Diffstat (limited to 'lib/gitlab')
-rw-r--r--lib/gitlab/import_export.rb2
-rw-r--r--lib/gitlab/import_export/import_export.yml6
-rw-r--r--lib/gitlab/import_export/relation_factory.rb5
3 files changed, 11 insertions, 2 deletions
diff --git a/lib/gitlab/import_export.rb b/lib/gitlab/import_export.rb
index bab2ea73c4f..d6d14bd98a0 100644
--- a/lib/gitlab/import_export.rb
+++ b/lib/gitlab/import_export.rb
@@ -2,7 +2,7 @@ module Gitlab
module ImportExport
extend self
- VERSION = '0.1.1'
+ VERSION = '0.1.2'
FILENAME_LIMIT = 50
def export_path(relative_path:)
diff --git a/lib/gitlab/import_export/import_export.yml b/lib/gitlab/import_export/import_export.yml
index 05f4ad527ac..15afe8174a4 100644
--- a/lib/gitlab/import_export/import_export.yml
+++ b/lib/gitlab/import_export/import_export.yml
@@ -53,7 +53,11 @@ included_attributes:
excluded_attributes:
snippets:
- :expired_at
+ merge_request_diff:
+ - :st_diffs
methods:
statuses:
- - :type \ No newline at end of file
+ - :type
+ merge_request_diff:
+ - :utf8_st_diffs \ No newline at end of file
diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb
index 6ba25a31641..e41c7e6bf4f 100644
--- a/lib/gitlab/import_export/relation_factory.rb
+++ b/lib/gitlab/import_export/relation_factory.rb
@@ -33,6 +33,7 @@ module Gitlab
update_project_references
reset_ci_tokens if @relation_name == 'Ci::Trigger'
@relation_hash['data'].deep_symbolize_keys! if @relation_name == :events && @relation_hash['data']
+ set_st_diffs if @relation_name == :merge_request_diff
generate_imported_object
end
@@ -129,6 +130,10 @@ module Gitlab
def parsed_relation_hash
@relation_hash.reject { |k, _v| !relation_class.attribute_method?(k) }
end
+
+ def set_st_diffs
+ @relation_hash['st_diffs'] = @relation_hash.delete('utf8_st_diffs')
+ end
end
end
end