summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Speicher <robert@gitlab.com>2017-05-17 17:54:41 +0000
committerRobert Speicher <robert@gitlab.com>2017-05-17 17:54:41 +0000
commit17e799980f6aaa6b378469f3e237c713f293e079 (patch)
treecd04fbe74badde004da527161c7bba4b24aa930c
parentfb67ea491ba86cb012e58d0e338039acd61400dd (diff)
parent992dfd7eb4c5bf26517d5d5adf3b3b9894ac397e (diff)
downloadgitlab-ce-17e799980f6aaa6b378469f3e237c713f293e079.tar.gz
Merge branch '32085-improve-ee-compat-check' into 'master'
Fetch CE/branch before running `git apply --check --3way patch` Closes #32085 See merge request !11412
-rw-r--r--lib/gitlab/ee_compat_check.rb8
1 files changed, 5 insertions, 3 deletions
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