From 992dfd7eb4c5bf26517d5d5adf3b3b9894ac397e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Coutable?= Date: Tue, 16 May 2017 15:34:04 +0200 Subject: Fetch CE/branch before running `git apply --check --3way patch` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémy Coutable --- lib/gitlab/ee_compat_check.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/gitlab/ee_compat_check.rb b/lib/gitlab/ee_compat_check.rb index 06438d2df41..198896220ac 100644 --- a/lib/gitlab/ee_compat_check.rb +++ b/lib/gitlab/ee_compat_check.rb @@ -131,10 +131,12 @@ module Gitlab def check_patch(patch_path) step("Checking out master", %w[git checkout master]) step("Resetting to latest master", %w[git reset --hard origin/master]) + step("Fetching CE/#{branch}", %W[git fetch #{CE_REPO} #{branch}]) step( "Checking if #{patch_path} applies cleanly to EE/master", %W[git apply --check --3way #{patch_path}] ) do |output, status| + puts output unless status.zero? @failed_files = output.lines.reduce([]) do |memo, line| if line.start_with?('error: patch failed:') @@ -309,12 +311,12 @@ module Gitlab U lib/gitlab/ee_compat_check.rb Resolve them, stage the changes and commit them. - + If the patch couldn't be applied cleanly, use the following command: - + # In the EE repo $ git apply --reject path/to/#{ce_branch}.patch - + This option makes git apply the parts of the patch that are applicable, and leave the rejected hunks in corresponding `.rej` files. You can then resolve the conflicts highlighted in `.rej` by -- cgit v1.2.1 From 611c2fb0bc1dea8ff8e47b8a62354ca9a1c002d7 Mon Sep 17 00:00:00 2001 From: Robert Speicher Date: Wed, 17 May 2017 15:17:02 -0400 Subject: Fix invalid object reference in ee_compat_check script --- lib/gitlab/ee_compat_check.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/gitlab/ee_compat_check.rb b/lib/gitlab/ee_compat_check.rb index 198896220ac..38e27513281 100644 --- a/lib/gitlab/ee_compat_check.rb +++ b/lib/gitlab/ee_compat_check.rb @@ -131,7 +131,7 @@ module Gitlab def check_patch(patch_path) step("Checking out master", %w[git checkout master]) step("Resetting to latest master", %w[git reset --hard origin/master]) - step("Fetching CE/#{branch}", %W[git fetch #{CE_REPO} #{branch}]) + step("Fetching CE/#{ce_branch}", %W[git fetch #{CE_REPO} #{ce_branch}]) step( "Checking if #{patch_path} applies cleanly to EE/master", %W[git apply --check --3way #{patch_path}] -- cgit v1.2.1