diff options
author | Jan Provaznik <jprovaznik@gitlab.com> | 2018-03-05 10:25:27 +0300 |
---|---|---|
committer | Jan Provaznik <jprovaznik@gitlab.com> | 2018-03-05 17:37:01 +0300 |
commit | 0b7d10851456018328da137beeca931767b4fd0a (patch) | |
tree | 1a75a67228c2ed8ce703ca5705a536c2cfe39474 | |
parent | 8a0052c037f025b64159ca8cfe0d3451261c1edb (diff) |
Cleanup after adding MR diff's commit_count
* processes any pending records which are not migrated yet
* bumps import_export version because of new commits_count attribute
* removes commits_count fallback method
-rw-r--r-- | app/models/merge_request_diff.rb | 4 | ||||
-rw-r--r-- | db/migrate/20180304204842_clean_commits_count_migration.rb | 14 | ||||
-rw-r--r-- | db/schema.rb | 2 | ||||
-rw-r--r-- | doc/user/project/settings/import_export.md | 3 | ||||
-rw-r--r-- | lib/gitlab/import_export.rb | 2 | ||||
-rw-r--r-- | spec/features/projects/import_export/test_project_export.tar.gz | bin | 343092 -> 343087 bytes | |||
-rw-r--r-- | vendor/project_templates/express.tar.gz | bin | 5614 -> 5608 bytes | |||
-rw-r--r-- | vendor/project_templates/rails.tar.gz | bin | 25007 -> 25004 bytes | |||
-rw-r--r-- | vendor/project_templates/spring.tar.gz | bin | 50945 -> 50938 bytes |
9 files changed, 18 insertions, 7 deletions
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb index c1c27ccf3e5..06aa67c600f 100644 --- a/app/models/merge_request_diff.rb +++ b/app/models/merge_request_diff.rb @@ -197,10 +197,6 @@ class MergeRequestDiff < ActiveRecord::Base CompareService.new(project, head_commit_sha).execute(project, sha, straight: true) end - def commits_count - super || merge_request_diff_commits.size - end - private def create_merge_request_diff_files(diffs) diff --git a/db/migrate/20180304204842_clean_commits_count_migration.rb b/db/migrate/20180304204842_clean_commits_count_migration.rb new file mode 100644 index 00000000000..ace4c6aa1cf --- /dev/null +++ b/db/migrate/20180304204842_clean_commits_count_migration.rb @@ -0,0 +1,14 @@ +class CleanCommitsCountMigration < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + Gitlab::BackgroundMigration.steal('AddMergeRequestDiffCommitsCount') + end + + def down + end +end diff --git a/db/schema.rb b/db/schema.rb index db8bafe9677..4937fbd3df1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180301084653) do +ActiveRecord::Schema.define(version: 20180304204842) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/doc/user/project/settings/import_export.md b/doc/user/project/settings/import_export.md index dedf102fc37..5ddeb014b30 100644 --- a/doc/user/project/settings/import_export.md +++ b/doc/user/project/settings/import_export.md @@ -31,7 +31,8 @@ with all their related data and be moved into a new GitLab instance. | GitLab version | Import/Export version | | ---------------- | --------------------- | -| 10.4 to current | 0.2.2 | +| 10.6 to current | 0.2.3 | +| 10.4 | 0.2.2 | | 10.3 | 0.2.1 | | 10.0 | 0.2.0 | | 9.4.0 | 0.1.8 | diff --git a/lib/gitlab/import_export.rb b/lib/gitlab/import_export.rb index af203ff711d..b713fa7e1cd 100644 --- a/lib/gitlab/import_export.rb +++ b/lib/gitlab/import_export.rb @@ -3,7 +3,7 @@ module Gitlab extend self # For every version update, the version history in import_export.md has to be kept up to date. - VERSION = '0.2.2'.freeze + VERSION = '0.2.3'.freeze FILENAME_LIMIT = 50 def export_path(relative_path:) diff --git a/spec/features/projects/import_export/test_project_export.tar.gz b/spec/features/projects/import_export/test_project_export.tar.gz Binary files differindex 0cc68aff494..12bfcc177c7 100644 --- a/spec/features/projects/import_export/test_project_export.tar.gz +++ b/spec/features/projects/import_export/test_project_export.tar.gz diff --git a/vendor/project_templates/express.tar.gz b/vendor/project_templates/express.tar.gz Binary files differindex dcf5e4a0416..06093deb459 100644 --- a/vendor/project_templates/express.tar.gz +++ b/vendor/project_templates/express.tar.gz diff --git a/vendor/project_templates/rails.tar.gz b/vendor/project_templates/rails.tar.gz Binary files differindex d4856090ed9..85cc1b6bb78 100644 --- a/vendor/project_templates/rails.tar.gz +++ b/vendor/project_templates/rails.tar.gz diff --git a/vendor/project_templates/spring.tar.gz b/vendor/project_templates/spring.tar.gz Binary files differindex 6ee7e76f676..e98d3ce7b8f 100644 --- a/vendor/project_templates/spring.tar.gz +++ b/vendor/project_templates/spring.tar.gz |