diff --git a/backport--instructions.rej b/backport--instructions.rej new file mode 100644 index 0000000000000..542d2aa3fa20b --- /dev/null +++ b/backport--instructions.rej @@ -0,0 +1,83 @@ +Backport of PR #9497 to branch 5.x failed + +https://github.com/elastic/kibana/pull/9497 + + +- 4 patches failed to apply +- 206 patches were applied successfully + +------------------------------------- + +At this point, you need to manually resolve these conflicts on your machine and +push the changes back up to this upstream branch so the PR is updated with your +changes. The following instructions and scripts should help with that. + +All of the provided scripts assume that the remote "upstream" is where the +backport branch exists and that your local branch has the exact same name as +the upstream branch. + +First, check out this branch locally: + + git fetch upstream jasper/backport/9497/5.x + git checkout jasper/backport/9497/5.x + +Now, just follow one of these two paths: + + +1. GUIDED BACKPORT + +You should do the guided backport if you want to apply the backported changes +while resolving the conflicts on each commit. For most cases, this is what you +want to do. + +The following script will rebase the commits that need to be backported onto +a new temporary branch. Resolve any conflicts as you normally would during a +rebase. Do not remove these backport-*.rej files, and feel free to add +additional commits if that's necessary: + + sh backport-guided-begin.rej + +Once the conficts are resolved and the rebase is completed, the following +script will update the local backport branch with the changes, remove the +temporary branch that was created, remove the remnants of this backport commit +and squash the newly resolved commits (and any others you may have added) into +a single backport commit with the proper commit message: + + sh backport-guided-finish.rej + +At this point, you should be on the local backport branch, and it should be +exactly 1 commit ahead of the intended target. The commit message should be +very similar if not identical to the PR itself, and the changeset should +include all of the changes you intended to backport and none of these +backport-*.rej files. + +Now just replace the contents of the pull request with your local changes: + + git push -f upstream jasper/backport/9497/5.x + + +2. ALMOST COMPLETELY MANUAL + +You should do this option if there are just so many conflicts that it's easier +to rebuild the entire changeset from scratch. You'll still work on the local +backport branch which should be up to date with the intended target. + +Feel free to add as many commits as you'd like and don't worry about fancy +commit messages - we're just going to squash them down and replace the message +when you're finished. + +Once the changes are committed on your local backport branch, the following +script will remove the remnants of this backport commit and squash the newly +created commits into a single backport commit with the proper commit message. + + sh backport-wrangle-into-commit.rej + +At this point, you should be on the local backport branch, and it should be +exactly 1 commit ahead of the intended target. The commit message should be +very similar if not identical to the PR itself, and the changeset should +include all of the changes you intended to backport and none of these +backport-*.rej files. + +Now just replace the contents of the pull request with your local changes: + + git push -f upstream jasper/backport/9497/5.x diff --git a/backport-commit-message.rej b/backport-commit-message.rej new file mode 100644 index 0000000000000..03296f3f152ce --- /dev/null +++ b/backport-commit-message.rej @@ -0,0 +1,45 @@ +[webpack] fix loader query string usage + +Backports PR #9497 + +**Commit 1:** +[webpack] pin to fork with fixed loader aliases + +* Original sha: a1e33576154e2d1cef8642a83ca60537491b05f3 +* Authored by spalger on 2016-12-13T21:57:21Z + +**Commit 2:** +[optimizer] upgrade to postcss+autoprefixer + +* Original sha: bceecd5929f8bbfb44c0a717ec824f7343711b8d +* Authored by spalger on 2016-12-14T23:57:18Z + +**Commit 3:** +[timelion] convert uiExports.modules -> webpackShims + +* Original sha: 7e90dc6355e5bd5178dabb7b3149ec10d321da12 +* Authored by spalger on 2016-12-15T17:20:54Z + +**Commit 4:** +[uiExports] remove implementation-leaking and unused uiExport types + +* Original sha: 10016f362d1ff46b1d879a03f553a7d8cb38862f +* Authored by spalger on 2016-12-15T17:59:04Z + +**Commit 5:** +[optimizer] remove unused imports + +* Original sha: b841c917f9206601312a5f903a8fd48c2c8cd256 +* Authored by spalger on 2016-12-15T18:01:37Z + +**Commit 6:** +[uiBundlerEnv] add a method for exporting global import aliases for special cases + +* Original sha: 4969d660df83335c9e082c3941b4c624500a2320 +* Authored by spalger on 2016-12-15T18:38:52Z + +**Commit 7:** +Merge branch 'master' of github.com:elastic/kibana into fix/webpack-loader-query-strings + +* Original sha: bcaf446e7b1cf6d64cc1f371c3e2f2952c1b55ee +* Authored by spalger on 2016-12-15T19:45:01Z \ No newline at end of file diff --git a/backport-guided-begin.rej b/backport-guided-begin.rej new file mode 100755 index 0000000000000..6120ab259676a --- /dev/null +++ b/backport-guided-begin.rej @@ -0,0 +1,12 @@ +#!/bin/sh + +REMOTE="upstream" +BRANCH="jasper/backport/9497/5.x" +WORKING_BRANCH="tmp/$BRANCH" +STARTING_SHA="a1e33576154e2d1cef8642a83ca60537491b05f3" +ENDING_SHA="bcaf446e7b1cf6d64cc1f371c3e2f2952c1b55ee" + +git fetch $REMOTE + +git checkout -b $WORKING_BRANCH $ENDING_SHA +git rebase $STARTING_SHA^ --onto $BRANCH diff --git a/backport-guided-finish.rej b/backport-guided-finish.rej new file mode 100755 index 0000000000000..34682260a9b90 --- /dev/null +++ b/backport-guided-finish.rej @@ -0,0 +1,10 @@ +#!/bin/sh + +BRANCH="jasper/backport/9497/5.x" +WORKING_BRANCH="tmp/$BRANCH" + +git checkout $BRANCH +git reset --hard $WORKING_BRANCH +git branch -D $WORKING_BRANCH + +sh backport-wrangle-into-commit.rej diff --git a/backport-wrangle-into-commit.rej b/backport-wrangle-into-commit.rej new file mode 100755 index 0000000000000..610d4d40b18a9 --- /dev/null +++ b/backport-wrangle-into-commit.rej @@ -0,0 +1,12 @@ +#!/bin/sh + +REMOTE="upstream" +BRANCH="jasper/backport/9497/5.x" +COMMIT_MSG=`cat backport-commit-message.rej` + +git reset --soft $REMOTE/$BRANCH +git stash +git reset --hard HEAD^ +git stash apply --index + +git commit -m "$COMMIT_MSG" --no-verify