diff --git a/backport--instructions.rej b/backport--instructions.rej new file mode 100644 index 0000000000000..c5164d68e0046 --- /dev/null +++ b/backport--instructions.rej @@ -0,0 +1,83 @@ +Backport of PR #6654 to branch 4.x failed + +https://github.com/elastic/kibana/pull/6654 + + +- 1 patch failed to apply +- 1 patch was 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/6654/4.x + git checkout jasper/backport/6654/4.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/6654/4.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/6654/4.x diff --git a/backport-commit-message.rej b/backport-commit-message.rej new file mode 100644 index 0000000000000..a080f9dc52673 --- /dev/null +++ b/backport-commit-message.rej @@ -0,0 +1,62 @@ +Backport PR #6654 +--------- + +**Commit 1:** +Troubleshooting + +* Original sha: 81a9f29b364c99aef39c407e580c540169948815 +* Authored by Shelby Sturgis on 2016-03-22T21:44:17Z + +**Commit 2:** +Merge branch 'master' into issue/6556 + +* Original sha: f628114f3e17c79a633dc547b94693e0974336da +* Authored by Shelby Sturgis on 2016-03-24T16:48:41Z + +**Commit 3:** +troubleshooting + +* Original sha: 152f2b6f380d57e1f06b5ba4ed94a15e356cdc9a +* Authored by Shelby Sturgis on 2016-03-24T17:13:01Z + +**Commit 4:** +Closes #6556. Fixes issue with global x and y axis selection. + +* Original sha: 2ffbb76d7a49a8b3b35f9a6ef6a95f40f03e620f +* Authored by Shelby Sturgis on 2016-03-24T22:44:54Z + +**Commit 5:** +Merge branch 'master' into issue/6556 + +* Original sha: da025aaca92783cb10fda1dc48c13ea532136aba +* Authored by Shelby Sturgis on 2016-03-24T22:45:12Z + +**Commit 6:** +Merge branch 'master' into issue/6556 + +* Original sha: cf4a152a976584b61833198775ab1bc7301de762 +* Authored by Shelby Sturgis on 2016-03-24T22:45:50Z + +**Commit 7:** +fixing tests + +* Original sha: b2f26e7924e23c471044d240404ef18637839ab5 +* Authored by Shelby Sturgis on 2016-03-25T16:55:30Z + +**Commit 8:** +Merge branch 'master' into issue/6556 + +* Original sha: a56c5d5f3535fa52cf4b83a4fefd51985664883e +* Authored by Shelby Sturgis on 2016-03-25T17:51:21Z + +**Commit 9:** +refactoring + +* Original sha: b42f5bfa2f2bd87dc7315e2219302cffbaacdb11 +* Authored by Shelby Sturgis on 2016-03-25T21:43:59Z + +**Commit 10:** +Merge branch 'master' into issue/6556 + +* Original sha: 7f96a111b75557f24b45df0343352362c3c5ec08 +* Authored by Shelby Sturgis on 2016-03-28T22:59:03Z \ No newline at end of file diff --git a/backport-guided-begin.rej b/backport-guided-begin.rej new file mode 100755 index 0000000000000..7619216c65b79 --- /dev/null +++ b/backport-guided-begin.rej @@ -0,0 +1,12 @@ +#!/bin/sh + +REMOTE="upstream" +BRANCH="jasper/backport/6654/4.x" +WORKING_BRANCH="tmp/$BRANCH" +STARTING_SHA="81a9f29b364c99aef39c407e580c540169948815" +ENDING_SHA="7f96a111b75557f24b45df0343352362c3c5ec08" + +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..f5873ac73a7c2 --- /dev/null +++ b/backport-guided-finish.rej @@ -0,0 +1,10 @@ +#!/bin/sh + +BRANCH="jasper/backport/6654/4.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..90875752e6bfe --- /dev/null +++ b/backport-wrangle-into-commit.rej @@ -0,0 +1,12 @@ +#!/bin/sh + +REMOTE="upstream" +BRANCH="jasper/backport/6654/4.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