summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan Provaznik <jprovaznik@gitlab.com>2018-03-08 12:43:14 +0100
committerJan Provaznik <jprovaznik@gitlab.com>2018-03-08 12:43:14 +0100
commit7db225e480e78948a1fc70517b4c8ab6ac1aeaf5 (patch)
treea14fc88751d29173c86297ddb06089aa32c8e215
parent0f26f9681faf2d49949f52227d6f4bd90c1b6e93 (diff)
downloadgitlab-ce-7db225e480e78948a1fc70517b4c8ab6ac1aeaf5.tar.gz
Revert "Cleanup after adding MR diff's commit_count"
This reverts commit 0b7d10851456018328da137beeca931767b4fd0a.
-rw-r--r--app/models/merge_request_diff.rb4
-rw-r--r--db/migrate/20180304204842_clean_commits_count_migration.rb14
-rw-r--r--doc/user/project/settings/import_export.md3
-rw-r--r--lib/gitlab/import_export.rb2
-rw-r--r--spec/features/projects/import_export/test_project_export.tar.gzbin343087 -> 343092 bytes
-rw-r--r--vendor/project_templates/express.tar.gzbin5608 -> 5614 bytes
-rw-r--r--vendor/project_templates/rails.tar.gzbin25004 -> 25007 bytes
-rw-r--r--vendor/project_templates/spring.tar.gzbin50938 -> 50945 bytes
8 files changed, 6 insertions, 17 deletions
diff --git a/app/models/merge_request_diff.rb b/app/models/merge_request_diff.rb
index 06aa67c600f..c1c27ccf3e5 100644
--- a/app/models/merge_request_diff.rb
+++ b/app/models/merge_request_diff.rb
@@ -197,6 +197,10 @@ 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
deleted file mode 100644
index ace4c6aa1cf..00000000000
--- a/db/migrate/20180304204842_clean_commits_count_migration.rb
+++ /dev/null
@@ -1,14 +0,0 @@
-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/doc/user/project/settings/import_export.md b/doc/user/project/settings/import_export.md
index 5ddeb014b30..dedf102fc37 100644
--- a/doc/user/project/settings/import_export.md
+++ b/doc/user/project/settings/import_export.md
@@ -31,8 +31,7 @@ with all their related data and be moved into a new GitLab instance.
| GitLab version | Import/Export version |
| ---------------- | --------------------- |
-| 10.6 to current | 0.2.3 |
-| 10.4 | 0.2.2 |
+| 10.4 to current | 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 b713fa7e1cd..af203ff711d 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.3'.freeze
+ VERSION = '0.2.2'.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
index 12bfcc177c7..0cc68aff494 100644
--- a/spec/features/projects/import_export/test_project_export.tar.gz
+++ b/spec/features/projects/import_export/test_project_export.tar.gz
Binary files differ
diff --git a/vendor/project_templates/express.tar.gz b/vendor/project_templates/express.tar.gz
index 06093deb459..dcf5e4a0416 100644
--- a/vendor/project_templates/express.tar.gz
+++ b/vendor/project_templates/express.tar.gz
Binary files differ
diff --git a/vendor/project_templates/rails.tar.gz b/vendor/project_templates/rails.tar.gz
index 85cc1b6bb78..d4856090ed9 100644
--- a/vendor/project_templates/rails.tar.gz
+++ b/vendor/project_templates/rails.tar.gz
Binary files differ
diff --git a/vendor/project_templates/spring.tar.gz b/vendor/project_templates/spring.tar.gz
index e98d3ce7b8f..6ee7e76f676 100644
--- a/vendor/project_templates/spring.tar.gz
+++ b/vendor/project_templates/spring.tar.gz
Binary files differ