diff --git a/backport--instructions.rej b/backport--instructions.rej new file mode 100644 index 0000000000000..31cf6fc43b4d0 --- /dev/null +++ b/backport--instructions.rej @@ -0,0 +1,83 @@ +Backport of PR #9242 to branch 5.x failed + +https://github.com/elastic/kibana/pull/9242 + + +- 1 patch failed to apply +- 10 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/9242/5.x + git checkout jasper/backport/9242/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/9242/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/9242/5.x diff --git a/backport-commit-message.rej b/backport-commit-message.rej new file mode 100644 index 0000000000000..f7dd551eada9e --- /dev/null +++ b/backport-commit-message.rej @@ -0,0 +1,76 @@ +New scripted field tests + +Backports PR #9242 + +**Commit 1:** +[WIP] new scripted field tests + +* Original sha: 6440101a7bbf4e6b7ffe7179382c135888ef1658 +* Authored by LeeDr on 2016-11-29T14:33:58Z + +**Commit 2:** +Merge branch 'master' into scriptedFieldTests + +* Original sha: 4590fcb2779fe7b06b58e8e0b18dcdb7ae3e1eb6 +* Authored by LeeDr on 2016-12-08T19:39:57Z + +**Commit 3:** +Final improvements on 12 new tests for 1 expression and 2 painless scripted fields + +* Original sha: 7e85c641aeec4250389b36a1932c062aab0d4a04 +* Authored by LeeDr on 2016-12-09T04:48:45Z + +**Commit 4:** +Add try loops around testing first Discover doc + +* Original sha: 8dfab849f4acc740aa708339a3b5d44954ed188c +* Authored by LeeDr on 2016-12-09T15:50:50Z + +**Commit 5:** +Set timezone to UTC and adjusted data accordingly + +* Original sha: 78018adbc5bc3a366f112b4fc5dea3766cff2144 +* Authored by LeeDr on 2016-12-09T17:23:31Z + +**Commit 6:** +Merge branch 'master' into scriptedFieldTests + +* Original sha: 75eb35096017d12b916d39db1cb26c0b2f9ae947 +* Authored by Spencer on 2016-12-13T18:13:54Z +* Committed by GitHub on 2016-12-13T18:13:54Z + +**Commit 7:** +Added boolean and date Painless scripted field types + +* Original sha: 1854ee39f24b8475c7294922a2ff56d689c186f5 +* Authored by LeeDr on 2016-12-15T19:59:04Z + +**Commit 8:** +Remove unused (non-working) methods + +* Original sha: c190cc5d39663ab22261e6764430f15f0d5d267f +* Authored by LeeDr on 2016-12-15T20:07:15Z + +**Commit 9:** +Merge branch 'master' into scriptedFieldTests + +* Original sha: ca29b91e133b4f773b5108aad6b3d85a5043527d +* Authored by LeeDr on 2016-12-15T20:08:47Z + +**Commit 10:** +Fix lint error + +* Original sha: c4f3e6cdaee4eb186f76360d4a6d07da0daecbda +* Authored by LeeDr on 2016-12-15T20:18:49Z + +**Commit 11:** +Added several data-test-subj attributes and used them in the tests + +* Original sha: 0528a553ad67551cce30825b06a72fcbcbe0275e +* Authored by LeeDr on 2016-12-16T22:28:01Z + +**Commit 12:** +Reverting previous change to getBarChartData + +* Original sha: 047d91289194fd81eb0dc57adf1e59e9a238f85a +* Authored by LeeDr on 2016-12-20T15:01:27Z \ No newline at end of file diff --git a/backport-guided-begin.rej b/backport-guided-begin.rej new file mode 100755 index 0000000000000..ccd80a33426a2 --- /dev/null +++ b/backport-guided-begin.rej @@ -0,0 +1,12 @@ +#!/bin/sh + +REMOTE="upstream" +BRANCH="jasper/backport/9242/5.x" +WORKING_BRANCH="tmp/$BRANCH" +STARTING_SHA="6440101a7bbf4e6b7ffe7179382c135888ef1658" +ENDING_SHA="047d91289194fd81eb0dc57adf1e59e9a238f85a" + +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..c3441f2959f40 --- /dev/null +++ b/backport-guided-finish.rej @@ -0,0 +1,10 @@ +#!/bin/sh + +BRANCH="jasper/backport/9242/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..a877ec7193a9e --- /dev/null +++ b/backport-wrangle-into-commit.rej @@ -0,0 +1,12 @@ +#!/bin/sh + +REMOTE="upstream" +BRANCH="jasper/backport/9242/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