Merge branch 'jprovazn-count-cleanup' into 'master'
Cleanup after adding MR diff's commit_count Closes #41698 See merge request gitlab-org/gitlab-ce!17513
This commit is contained in:
commit
49f72d0665
9 changed files with 18 additions and 7 deletions
|
@ -197,10 +197,6 @@ class MergeRequestDiff < ActiveRecord::Base
|
||||||
CompareService.new(project, head_commit_sha).execute(project, sha, straight: true)
|
CompareService.new(project, head_commit_sha).execute(project, sha, straight: true)
|
||||||
end
|
end
|
||||||
|
|
||||||
def commits_count
|
|
||||||
super || merge_request_diff_commits.size
|
|
||||||
end
|
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
||||||
def create_merge_request_diff_files(diffs)
|
def create_merge_request_diff_files(diffs)
|
||||||
|
|
14
db/migrate/20180304204842_clean_commits_count_migration.rb
Normal file
14
db/migrate/20180304204842_clean_commits_count_migration.rb
Normal file
|
@ -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
|
|
@ -11,7 +11,7 @@
|
||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# 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
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
|
@ -31,7 +31,8 @@ with all their related data and be moved into a new GitLab instance.
|
||||||
|
|
||||||
| GitLab version | Import/Export version |
|
| 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.3 | 0.2.1 |
|
||||||
| 10.0 | 0.2.0 |
|
| 10.0 | 0.2.0 |
|
||||||
| 9.4.0 | 0.1.8 |
|
| 9.4.0 | 0.1.8 |
|
||||||
|
|
|
@ -3,7 +3,7 @@ module Gitlab
|
||||||
extend self
|
extend self
|
||||||
|
|
||||||
# For every version update, the version history in import_export.md has to be kept up to date.
|
# 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
|
FILENAME_LIMIT = 50
|
||||||
|
|
||||||
def export_path(relative_path:)
|
def export_path(relative_path:)
|
||||||
|
|
Binary file not shown.
BIN
vendor/project_templates/express.tar.gz
vendored
BIN
vendor/project_templates/express.tar.gz
vendored
Binary file not shown.
BIN
vendor/project_templates/rails.tar.gz
vendored
BIN
vendor/project_templates/rails.tar.gz
vendored
Binary file not shown.
BIN
vendor/project_templates/spring.tar.gz
vendored
BIN
vendor/project_templates/spring.tar.gz
vendored
Binary file not shown.
Loading…
Reference in a new issue