Commit 70e2acea authored by Ruben Davila's avatar Ruben Davila

Merge remote-tracking branch 'ce/master' into ce-to-ee

parents 409e3a62 8890376f
...@@ -57,6 +57,7 @@ v 8.11.0 (unreleased) ...@@ -57,6 +57,7 @@ v 8.11.0 (unreleased)
- Sensible state specific default sort order for issues and merge requests !5453 (tomb0y) - Sensible state specific default sort order for issues and merge requests !5453 (tomb0y)
- Fix RequestProfiler::Middleware error when code is reloaded in development - Fix RequestProfiler::Middleware error when code is reloaded in development
- Catch what warden might throw when profiling requests to re-throw it - Catch what warden might throw when profiling requests to re-throw it
- Speed up and reduce memory usage of Commit#repo_changes, Repository#expire_avatar_cache and IrkerWorker
v 8.10.3 v 8.10.3
- Fix Import/Export issue importing milestones and labels not associated properly. !5426 - Fix Import/Export issue importing milestones and labels not associated properly. !5426
......
...@@ -57,7 +57,7 @@ gem 'browser', '~> 2.2' ...@@ -57,7 +57,7 @@ gem 'browser', '~> 2.2'
# Extracting information from a git repository # Extracting information from a git repository
# Provide access to Gitlab::Git library # Provide access to Gitlab::Git library
gem 'gitlab_git', '~> 10.4.2' gem 'gitlab_git', '~> 10.4.3'
# LDAP Auth # LDAP Auth
# GitLab fork with several improvements to original library. For full list of changes # GitLab fork with several improvements to original library. For full list of changes
......
...@@ -300,7 +300,7 @@ GEM ...@@ -300,7 +300,7 @@ GEM
mime-types (>= 1.16, < 3) mime-types (>= 1.16, < 3)
posix-spawn (~> 0.3) posix-spawn (~> 0.3)
gitlab-license (1.0.0) gitlab-license (1.0.0)
gitlab_git (10.4.2) gitlab_git (10.4.3)
activesupport (~> 4.0) activesupport (~> 4.0)
charlock_holmes (~> 0.7.3) charlock_holmes (~> 0.7.3)
github-linguist (~> 4.7.0) github-linguist (~> 4.7.0)
...@@ -901,7 +901,7 @@ DEPENDENCIES ...@@ -901,7 +901,7 @@ DEPENDENCIES
gitlab-elasticsearch-git (~> 0.0.15) gitlab-elasticsearch-git (~> 0.0.15)
gitlab-flowdock-git-hook (~> 1.0.1) gitlab-flowdock-git-hook (~> 1.0.1)
gitlab-license (~> 1.0) gitlab-license (~> 1.0)
gitlab_git (~> 10.4.2) gitlab_git (~> 10.4.3)
gitlab_meta (= 7.0) gitlab_meta (= 7.0)
gitlab_omniauth-ldap (~> 1.2.1) gitlab_omniauth-ldap (~> 1.2.1)
gollum-lib (~> 4.2) gollum-lib (~> 4.2)
......
...@@ -334,7 +334,7 @@ class Commit ...@@ -334,7 +334,7 @@ class Commit
def repo_changes def repo_changes
changes = { added: [], modified: [], removed: [] } changes = { added: [], modified: [], removed: [] }
raw_diffs.each do |diff| raw_diffs(deltas_only: true).each do |diff|
if diff.deleted_file if diff.deleted_file
changes[:removed] << diff.old_path changes[:removed] << diff.old_path
elsif diff.renamed_file || diff.new_file elsif diff.renamed_file || diff.new_file
......
...@@ -437,7 +437,7 @@ class Repository ...@@ -437,7 +437,7 @@ class Repository
# We don't want to flush the cache if the commit didn't actually make any # We don't want to flush the cache if the commit didn't actually make any
# changes to any of the possible avatar files. # changes to any of the possible avatar files.
if revision && commit = self.commit(revision) if revision && commit = self.commit(revision)
return unless commit.raw_diffs. return unless commit.raw_diffs(deltas_only: true).
any? { |diff| AVATAR_FILES.include?(diff.new_path) } any? { |diff| AVATAR_FILES.include?(diff.new_path) }
end end
......
...@@ -141,7 +141,7 @@ class IrkerWorker ...@@ -141,7 +141,7 @@ class IrkerWorker
end end
def files_count(commit) def files_count(commit)
diffs = commit.raw_diffs diffs = commit.raw_diffs(deltas_only: true)
files = "#{diffs.real_size} file" files = "#{diffs.real_size} file"
files += 's' if diffs.size > 1 files += 's' if diffs.size > 1
......
...@@ -5,7 +5,8 @@ namespace :gitlab do ...@@ -5,7 +5,8 @@ namespace :gitlab do
warn_user_is_not_gitlab warn_user_is_not_gitlab
default_version = Gitlab::Shell.version_required default_version = Gitlab::Shell.version_required
args.with_defaults(tag: 'v' + default_version, repo: "https://gitlab.com/gitlab-org/gitlab-shell.git") default_version_tag = 'v' + default_version
args.with_defaults(tag: default_version_tag, repo: "https://gitlab.com/gitlab-org/gitlab-shell.git")
user = Gitlab.config.gitlab.user user = Gitlab.config.gitlab.user
home_dir = Rails.env.test? ? Rails.root.join('tmp/tests') : Gitlab.config.gitlab.user_home home_dir = Rails.env.test? ? Rails.root.join('tmp/tests') : Gitlab.config.gitlab.user_home
...@@ -15,7 +16,12 @@ namespace :gitlab do ...@@ -15,7 +16,12 @@ namespace :gitlab do
target_dir = Gitlab.config.gitlab_shell.path target_dir = Gitlab.config.gitlab_shell.path
# Clone if needed # Clone if needed
unless File.directory?(target_dir) if File.directory?(target_dir)
Dir.chdir(target_dir) do
system(*%W(Gitlab.config.git.bin_path} fetch --tags --quiet))
system(*%W(Gitlab.config.git.bin_path} checkout --quiet #{default_version_tag}))
end
else
system(*%W(#{Gitlab.config.git.bin_path} clone -- #{args.repo} #{target_dir})) system(*%W(#{Gitlab.config.git.bin_path} clone -- #{args.repo} #{target_dir}))
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment