diff options
Diffstat (limited to 'www/gitlab/files')
| -rw-r--r-- | www/gitlab/files/patch-6130 | 189 | ||||
| -rw-r--r-- | www/gitlab/files/patch-Gemfile | 45 | ||||
| -rw-r--r-- | www/gitlab/files/patch-config_database.yml.postgresql | 2 | ||||
| -rw-r--r-- | www/gitlab/files/patch-config_gitlab.yml.example | 2 | ||||
| -rw-r--r-- | www/gitlab/files/patch-config_initializers_1__settings.rb | 2 | ||||
| -rw-r--r-- | www/gitlab/files/patch-config_unicorn.rb.example | 2 | ||||
| -rw-r--r-- | www/gitlab/files/patch-lib_support_nginx_gitlab | 2 | ||||
| -rw-r--r-- | www/gitlab/files/patch-lib_support_nginx_gitlab-ssl | 2 | ||||
| -rw-r--r-- | www/gitlab/files/patch-new-gitlab-git | 104 |
9 files changed, 31 insertions, 319 deletions
diff --git a/www/gitlab/files/patch-6130 b/www/gitlab/files/patch-6130 deleted file mode 100644 index 64c1d91d7782..000000000000 --- a/www/gitlab/files/patch-6130 +++ /dev/null @@ -1,189 +0,0 @@ ---- app/models/repository.rb.orig 2017-01-31 15:55:26 UTC -+++ app/models/repository.rb -@@ -176,7 +176,7 @@ class Repository - before_remove_branch - - branch = find_branch(branch_name) -- oldrev = branch.try(:target).try(:id) -+ oldrev = branch.try(:dereferenced_target).try(:id) - newrev = Gitlab::Git::BLANK_SHA - ref = Gitlab::Git::BRANCH_REF_PREFIX + branch_name - -@@ -292,10 +292,10 @@ class Repository - # Rugged seems to throw a `ReferenceError` when given branch_names rather - # than SHA-1 hashes - number_commits_behind = raw_repository. -- count_commits_between(branch.target.sha, root_ref_hash) -+ count_commits_between(branch.dereferenced_target.sha, root_ref_hash) - - number_commits_ahead = raw_repository. -- count_commits_between(root_ref_hash, branch.target.sha) -+ count_commits_between(root_ref_hash, branch.dereferenced_target.sha) - - { behind: number_commits_behind, ahead: number_commits_ahead } - end -@@ -674,11 +674,11 @@ class Repository - branches.sort_by(&:name) - when 'updated_desc' - branches.sort do |a, b| -- commit(b.target).committed_date <=> commit(a.target).committed_date -+ commit(b.dereferenced_target).committed_date <=> commit(a.dereferenced_target).committed_date - end - when 'updated_asc' - branches.sort do |a, b| -- commit(a.target).committed_date <=> commit(b.target).committed_date -+ commit(a.dereferenced_target).committed_date <=> commit(b.dereferenced_target).committed_date - end - else - branches -@@ -884,7 +884,7 @@ class Repository - end - - def revert(user, commit, base_branch, revert_tree_id = nil) -- source_sha = find_branch(base_branch).target.sha -+ source_sha = find_branch(base_branch).dereferenced_target.sha - revert_tree_id ||= check_revert_content(commit, base_branch) - - return false unless revert_tree_id -@@ -901,7 +901,7 @@ class Repository - end - - def cherry_pick(user, commit, base_branch, cherry_pick_tree_id = nil) -- source_sha = find_branch(base_branch).target.sha -+ source_sha = find_branch(base_branch).dereferenced_target.sha - cherry_pick_tree_id ||= check_cherry_pick_content(commit, base_branch) - - return false unless cherry_pick_tree_id -@@ -930,7 +930,7 @@ class Repository - end - - def check_revert_content(commit, base_branch) -- source_sha = find_branch(base_branch).target.sha -+ source_sha = find_branch(base_branch).dereferenced_target.sha - args = [commit.id, source_sha] - args << { mainline: 1 } if commit.merge_commit? - -@@ -944,7 +944,7 @@ class Repository - end - - def check_cherry_pick_content(commit, base_branch) -- source_sha = find_branch(base_branch).target.sha -+ source_sha = find_branch(base_branch).dereferenced_target.sha - args = [commit.id, source_sha] - args << 1 if commit.merge_commit? - ---- lib/gitlab/popen.rb.orig 2016-11-09 05:10:18 UTC -+++ lib/gitlab/popen.rb -@@ -21,9 +21,9 @@ module Gitlab - @cmd_output = "" - @cmd_status = 0 - Open3.popen3(vars, *cmd, options) do |stdin, stdout, stderr, wait_thr| -- # We are not using stdin so we should close it, in case the command we -- # are running waits for input. -+ yield(stdin) if block_given? - stdin.close -+ - @cmd_output << stdout.read - @cmd_output << stderr.read - @cmd_status = wait_thr.value.exitstatus ---- spec/lib/gitlab/popen_spec.rb.orig 2016-11-09 05:10:18 UTC -+++ spec/lib/gitlab/popen_spec.rb -@@ -40,4 +40,13 @@ describe 'Gitlab::Popen', lib: true, no_ - it { expect(@status).to be_zero } - it { expect(@output).to include('spec') } - end -+ -+ context 'use stdin' do -+ before do -+ @output, @status = @klass.new.popen(%w[cat]) { |stdin| stdin.write 'hello' } -+ end -+ -+ it { expect(@status).to be_zero } -+ it { expect(@output).to eq('hello') } -+ end - end ---- spec/models/repository_spec.rb.orig 2016-11-09 05:10:18 UTC -+++ spec/models/repository_spec.rb -@@ -443,31 +443,32 @@ describe Repository, models: true do - - describe '#commit_with_hooks' do - let(:old_rev) { '0b4bc9a49b562e85de7cc9e834518ea6828729b9' } # git rev-parse feature -+ let(:new_rev) { 'a74ae73c1ccde9b974a70e82b901588071dc142a' } # commit whose parent is old_rev - - context 'when pre hooks were successful' do - before do - expect_any_instance_of(GitHooksService).to receive(:execute). -- with(user, repository.path_to_repo, old_rev, sample_commit.id, 'refs/heads/feature'). -+ with(user, repository.path_to_repo, old_rev, new_rev, 'refs/heads/feature'). - and_yield.and_return(true) - end - - it 'runs without errors' do - expect do -- repository.commit_with_hooks(user, 'feature') { sample_commit.id } -+ repository.commit_with_hooks(user, 'feature') { new_rev } - end.not_to raise_error - end - - it 'ensures the autocrlf Git option is set to :input' do - expect(repository).to receive(:update_autocrlf_option) - -- repository.commit_with_hooks(user, 'feature') { sample_commit.id } -+ repository.commit_with_hooks(user, 'feature') { new_rev } - end - - context "when the branch wasn't empty" do - it 'updates the head' do - expect(repository.find_branch('feature').target.id).to eq(old_rev) -- repository.commit_with_hooks(user, 'feature') { sample_commit.id } -- expect(repository.find_branch('feature').target.id).to eq(sample_commit.id) -+ repository.commit_with_hooks(user, 'feature') { new_rev } -+ expect(repository.find_branch('feature').target.id).to eq(new_rev) - end - end - end -@@ -477,7 +478,7 @@ describe Repository, models: true do - allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([false, '']) - - expect do -- repository.commit_with_hooks(user, 'feature') { sample_commit.id } -+ repository.commit_with_hooks(user, 'feature') { new_rev } - end.to raise_error(GitHooksService::PreReceiveError) - end - end -@@ -485,6 +486,7 @@ describe Repository, models: true do - context 'when target branch is different from source branch' do - before do - allow_any_instance_of(Gitlab::Git::Hook).to receive(:trigger).and_return([true, '']) -+ allow(repository).to receive(:update_ref!) - end - - it 'expires branch cache' do -@@ -495,7 +497,7 @@ describe Repository, models: true do - expect(repository).to receive(:expire_has_visible_content_cache) - expect(repository).to receive(:expire_branch_count_cache) - -- repository.commit_with_hooks(user, 'new-feature') { sample_commit.id } -+ repository.commit_with_hooks(user, 'new-feature') { new_rev } - end - end - -@@ -1268,4 +1270,18 @@ describe Repository, models: true do - File.delete(path) - end - end -+ -+ describe '#update_ref!' do -+ it 'can create a ref' do -+ repository.update_ref!('refs/heads/foobar', 'refs/heads/master', Gitlab::Git::BLANK_SHA) -+ -+ expect(repository.find_branch('foobar')).not_to be_nil -+ end -+ -+ it 'raises CommitError when the ref update fails' do -+ expect do -+ repository.update_ref!('refs/heads/master', 'refs/heads/master', Gitlab::Git::BLANK_SHA) -+ end.to raise_error(Repository::CommitError) -+ end -+ end - end diff --git a/www/gitlab/files/patch-Gemfile b/www/gitlab/files/patch-Gemfile index e4180cc3ef2b..dcdaa6e4beff 100644 --- a/www/gitlab/files/patch-Gemfile +++ b/www/gitlab/files/patch-Gemfile @@ -1,4 +1,4 @@ ---- Gemfile.orig 2016-11-09 05:10:18 UTC +--- Gemfile.orig 2016-12-14 20:07:13 UTC +++ Gemfile @@ -1,6 +1,6 @@ source 'https://rubygems.org' @@ -27,12 +27,7 @@ # Authentication libraries gem 'devise', '~> 4.0' -@@ -26,20 +25,19 @@ gem 'omniauth-auth0', '~> 1.4.1' - gem 'omniauth-azure-oauth2', '~> 0.0.6' - gem 'omniauth-bitbucket', '~> 0.0.2' - gem 'omniauth-cas3', '~> 1.1.2' --gem 'omniauth-facebook', '~> 3.0.0' -+gem 'omniauth-facebook', '>= 3.0.0' +@@ -30,16 +29,15 @@ gem 'omniauth-facebook', '~> 4.0.0' gem 'omniauth-github', '~> 1.1.1' gem 'omniauth-gitlab', '~> 1.0.0' gem 'omniauth-google-oauth2', '~> 0.4.1' @@ -53,7 +48,16 @@ gem 'akismet', '~> 2.0' # Two-factor authentication -@@ -66,21 +64,21 @@ gem 'gollum-lib', '~> 4.2', require: fal +@@ -53,7 +51,7 @@ gem 'browser', '~> 2.2' + + # Extracting information from a git repository + # Provide access to Gitlab::Git library +-gem 'gitlab_git', '~> 10.6.6' ++gem 'gitlab_git', '>= 10.6.6' + + # LDAP Auth + # GitLab fork with several improvements to original library. For full list of changes +@@ -66,10 +64,10 @@ gem 'gollum-lib', '~> 4.2', require: fal gem 'gollum-rugged_adapter', '~> 0.4.2', require: false # Language detection @@ -62,12 +66,11 @@ # API -gem 'grape', '~> 0.15.0' --gem 'grape-entity', '~> 0.4.2' +gem 'grape', '>= 0.15.0' -+gem 'grape-entity', '>= 0.4.2' + gem 'grape-entity', '~> 0.6.0' gem 'rack-cors', '~> 0.4.0', require: 'rack/cors' - # Pagination +@@ -77,10 +75,10 @@ gem 'rack-cors', '~> 0.4.0', require: gem 'kaminari', '~> 0.17.0' # HAML @@ -80,10 +83,10 @@ # Drag and Drop UI gem 'dropzonejs-rails', '~> 0.7.1' -@@ -107,25 +105,25 @@ gem 'seed-fu', '~> 2.3.5' +@@ -104,25 +102,25 @@ gem 'seed-fu', '~> 2.3.5' gem 'html-pipeline', '~> 1.11.0' gem 'task_list', '~> 1.0.2', require: 'task_list/railtie' - gem 'github-markup', '~> 1.4' + gem 'gitlab-markup', '~> 1.5.0' -gem 'redcarpet', '~> 3.3.3' +gem 'redcarpet', '>= 3.3.3' gem 'RedCloth', '~> 4.3.2' @@ -112,7 +115,7 @@ gem 'unicorn-worker-killer', '~> 0.4.2' end -@@ -144,7 +142,7 @@ gem 'sidekiq-cron', '~> 0.4.0' +@@ -141,7 +139,7 @@ gem 'sidekiq-cron', '~> 0.4.0' gem 'redis-namespace', '~> 1.5.2' # HTTP requests @@ -121,7 +124,7 @@ # Colored output to console gem 'rainbow', '~> 2.1.0' -@@ -173,10 +171,10 @@ gem 'gitlab-flowdock-git-hook', '~> 1.0. +@@ -170,10 +168,10 @@ gem 'gitlab-flowdock-git-hook', '~> 1.0. gem 'gemnasium-gitlab-service', '~> 0.2' # Slack integration @@ -134,7 +137,7 @@ # FogBugz integration gem 'ruby-fogbugz', '~> 0.2.1' -@@ -188,17 +186,17 @@ gem 'd3_rails', '~> 3.5.0' +@@ -185,17 +183,17 @@ gem 'd3_rails', '~> 3.5.0' gem 'underscore-rails', '~> 1.8.0' # Sanitize user input @@ -155,7 +158,7 @@ # Ace editor gem 'ace-rails-ap', '~> 4.1.0' -@@ -215,125 +213,42 @@ gem 'chronic_duration', '~> 0.10.6' +@@ -215,127 +213,42 @@ gem 'chronic_duration', '~> 0.10.6' gem 'sass-rails', '~> 5.0.0' gem 'coffee-rails', '~> 4.1.0' @@ -249,9 +252,10 @@ - gem 'spring-commands-spinach', '~> 1.1.0' - gem 'spring-commands-teaspoon', '~> 0.0.2' - -- gem 'rubocop', '~> 0.41.2', require: false +- gem 'rubocop', '~> 0.42.0', require: false - gem 'rubocop-rspec', '~> 1.5.0', require: false - gem 'scss_lint', '~> 0.47.0', require: false +- gem 'haml_lint', '~> 0.18.2', require: false - gem 'simplecov', '0.12.0', require: false - gem 'flog', '~> 4.3.2', require: false - gem 'flay', '~> 2.6.1', require: false @@ -270,6 +274,7 @@ - gem 'webmock', '~> 1.21.0' - gem 'test_after_commit', '~> 0.4.2' - gem 'sham_rack', '~> 1.3.6' +- gem 'timecop', '~> 0.8.0' -end - group :production do @@ -281,7 +286,7 @@ -gem 'octokit', '~> 4.3.0' +gem 'octokit', '>= 4.3.0' - gem 'mail_room', '~> 0.8' + gem 'mail_room', '~> 0.8.1' gem 'email_reply_parser', '~> 0.5.8' @@ -290,7 +295,7 @@ ## CI gem 'activerecord-session_store', '~> 1.0.0' -@@ -346,8 +261,10 @@ gem 'oauth2', '~> 1.2.0' +@@ -348,8 +261,10 @@ gem 'oauth2', '~> 1.2.0' gem 'paranoia', '~> 2.0' # Health check diff --git a/www/gitlab/files/patch-config_database.yml.postgresql b/www/gitlab/files/patch-config_database.yml.postgresql index 401b081602d2..24d4d3145530 100644 --- a/www/gitlab/files/patch-config_database.yml.postgresql +++ b/www/gitlab/files/patch-config_database.yml.postgresql @@ -1,4 +1,4 @@ ---- config/database.yml.postgresql.orig 2016-10-11 15:15:22 UTC +--- config/database.yml.postgresql.orig 2016-12-14 20:07:13 UTC +++ config/database.yml.postgresql @@ -6,7 +6,7 @@ production: encoding: unicode diff --git a/www/gitlab/files/patch-config_gitlab.yml.example b/www/gitlab/files/patch-config_gitlab.yml.example index 3aeda1f3f891..001e3562cbc3 100644 --- a/www/gitlab/files/patch-config_gitlab.yml.example +++ b/www/gitlab/files/patch-config_gitlab.yml.example @@ -1,4 +1,4 @@ ---- config/gitlab.yml.example.orig 2016-10-11 15:15:22 UTC +--- config/gitlab.yml.example.orig 2016-12-14 20:07:13 UTC +++ config/gitlab.yml.example @@ -433,7 +433,7 @@ production: &base # Paths where repositories can be stored. Give the canonicalized absolute pathname. diff --git a/www/gitlab/files/patch-config_initializers_1__settings.rb b/www/gitlab/files/patch-config_initializers_1__settings.rb index 2c9acb94c1d6..22d9c03da194 100644 --- a/www/gitlab/files/patch-config_initializers_1__settings.rb +++ b/www/gitlab/files/patch-config_initializers_1__settings.rb @@ -1,4 +1,4 @@ ---- config/initializers/1_settings.rb.orig 2016-10-11 15:15:22 UTC +--- config/initializers/1_settings.rb.orig 2016-12-14 20:07:13 UTC +++ config/initializers/1_settings.rb @@ -189,12 +189,8 @@ Settings.gitlab['email_reply_to'] ||= EN Settings.gitlab['base_url'] ||= Settings.send(:build_base_gitlab_url) diff --git a/www/gitlab/files/patch-config_unicorn.rb.example b/www/gitlab/files/patch-config_unicorn.rb.example index de154238be8a..e19110ce1115 100644 --- a/www/gitlab/files/patch-config_unicorn.rb.example +++ b/www/gitlab/files/patch-config_unicorn.rb.example @@ -1,4 +1,4 @@ ---- config/unicorn.rb.example.orig 2016-10-11 15:15:22 UTC +--- config/unicorn.rb.example.orig 2016-12-14 20:07:13 UTC +++ config/unicorn.rb.example @@ -33,12 +33,12 @@ worker_processes 3 diff --git a/www/gitlab/files/patch-lib_support_nginx_gitlab b/www/gitlab/files/patch-lib_support_nginx_gitlab index 7121fe319fd2..e006ecf5c948 100644 --- a/www/gitlab/files/patch-lib_support_nginx_gitlab +++ b/www/gitlab/files/patch-lib_support_nginx_gitlab @@ -1,4 +1,4 @@ ---- lib/support/nginx/gitlab.orig 2016-10-11 15:15:22 UTC +--- lib/support/nginx/gitlab.orig 2016-12-14 20:07:13 UTC +++ lib/support/nginx/gitlab @@ -17,7 +17,7 @@ ## See installation.md#using-https for additional HTTPS configuration details. diff --git a/www/gitlab/files/patch-lib_support_nginx_gitlab-ssl b/www/gitlab/files/patch-lib_support_nginx_gitlab-ssl index 65ed2bc8d7a8..74882f373332 100644 --- a/www/gitlab/files/patch-lib_support_nginx_gitlab-ssl +++ b/www/gitlab/files/patch-lib_support_nginx_gitlab-ssl @@ -1,4 +1,4 @@ ---- lib/support/nginx/gitlab-ssl.orig 2016-10-11 15:15:22 UTC +--- lib/support/nginx/gitlab-ssl.orig 2016-12-14 20:07:13 UTC +++ lib/support/nginx/gitlab-ssl @@ -21,7 +21,7 @@ ## See installation.md#using-https for additional HTTPS configuration details. diff --git a/www/gitlab/files/patch-new-gitlab-git b/www/gitlab/files/patch-new-gitlab-git deleted file mode 100644 index 9204ca0712c5..000000000000 --- a/www/gitlab/files/patch-new-gitlab-git +++ /dev/null @@ -1,104 +0,0 @@ ---- app/controllers/projects/tags_controller.rb.orig 2016-11-09 05:10:18 UTC -+++ app/controllers/projects/tags_controller.rb -@@ -17,7 +17,7 @@ class Projects::TagsController < Project - @tag = @repository.find_tag(params[:id]) - - @release = @project.releases.find_or_initialize_by(tag: @tag.name) -- @commit = @repository.commit(@tag.target) -+ @commit = @repository.commit(@tag.dereferenced_target) - end - - def create ---- app/services/delete_branch_service.rb.orig 2016-11-09 05:10:18 UTC -+++ app/services/delete_branch_service.rb -@@ -42,7 +42,7 @@ class DeleteBranchService < BaseService - Gitlab::DataBuilder::Push.build( - project, - current_user, -- branch.target.sha, -+ branch.dereferenced_target.sha, - Gitlab::Git::BLANK_SHA, - "#{Gitlab::Git::BRANCH_REF_PREFIX}#{branch.name}", - []) ---- app/services/delete_tag_service.rb.orig 2016-11-09 05:10:18 UTC -+++ app/services/delete_tag_service.rb -@@ -36,7 +36,7 @@ class DeleteTagService < BaseService - Gitlab::DataBuilder::Push.build( - project, - current_user, -- tag.target.sha, -+ tag.dereferenced_target.sha, - Gitlab::Git::BLANK_SHA, - "#{Gitlab::Git::TAG_REF_PREFIX}#{tag.name}", - []) ---- app/services/git_tag_push_service.rb.orig 2016-11-09 05:10:18 UTC -+++ app/services/git_tag_push_service.rb -@@ -27,8 +27,8 @@ class GitTagPushService < BaseService - tag_name = Gitlab::Git.ref_name(params[:ref]) - tag = project.repository.find_tag(tag_name) - -- if tag && tag.object_sha == params[:newrev] -- commit = project.commit(tag.target) -+ if tag && tag.target == params[:newrev] -+ commit = project.commit(tag.dereferenced_target) - commits = [commit].compact - message = tag.message - end ---- app/views/projects/branches/_branch.html.haml.orig 2016-11-09 05:10:18 UTC -+++ app/views/projects/branches/_branch.html.haml -@@ -1,4 +1,4 @@ --- commit = @repository.commit(branch.target) -+- commit = @repository.commit(branch.dereferenced_target) - - bar_graph_width_factor = @max_commits > 0 ? 100.0/@max_commits : 0 - - diverging_commit_counts = @repository.diverging_commit_counts(branch) - - number_commits_behind = diverging_commit_counts[:behind] ---- app/views/projects/issues/_related_branches.html.haml.orig 2016-11-09 05:10:18 UTC -+++ app/views/projects/issues/_related_branches.html.haml -@@ -4,7 +4,7 @@ - %ul.unstyled-list - - @related_branches.each do |branch| - %li -- - target = @project.repository.find_branch(branch).target -+ - target = @project.repository.find_branch(branch).dereferenced_target - - pipeline = @project.pipeline(target.sha, branch) if target - - if pipeline - %span.related-branch-ci-status ---- app/views/projects/tags/_tag.html.haml.orig 2016-11-09 05:10:18 UTC -+++ app/views/projects/tags/_tag.html.haml -@@ -1,4 +1,4 @@ --- commit = @repository.commit(tag.target) -+- commit = @repository.commit(tag.dereferenced_target) - - release = @releases.find { |release| release.tag == tag.name } - %li - %div ---- lib/api/entities.rb.orig 2016-11-09 05:10:18 UTC -+++ lib/api/entities.rb -@@ -125,7 +125,7 @@ module API - expose :name - - expose :commit do |repo_branch, options| -- options[:project].repository.commit(repo_branch.target) -+ options[:project].repository.commit(repo_branch.dereferenced_target) - end - - expose :protected do |repo_branch, options| -@@ -449,7 +449,7 @@ module API - expose :name, :message - - expose :commit do |repo_tag, options| -- options[:project].repository.commit(repo_tag.target) -+ options[:project].repository.commit(repo_tag.dereferenced_target) - end - - expose :release, using: Entities::Release do |repo_tag, options| ---- lib/gitlab/data_builder/push.rb.orig 2016-11-09 05:10:18 UTC -+++ lib/gitlab/data_builder/push.rb -@@ -83,7 +83,7 @@ module Gitlab - tag = repository.find_tag(tag_name) - - if tag -- commit = repository.commit(tag.target) -+ commit = repository.commit(tag.dereferenced_target) - commit.try(:sha) - end - else |
