From fdd99ee3d377f10eb53db3b849716b003bb60f9d Mon Sep 17 00:00:00 2001 From: Elastic Jasper Date: Wed, 10 Aug 2016 09:27:46 -0400 Subject: [PATCH] Backport PR #7807 --------- **Commit 1:** Added 'Upgrading Kibana' section * Original sha: 32ed1ceb4daa4e82e70be738969360cfb95c61be * Authored by LeeDr on 2016-07-22T18:25:11Z **Commit 2:** Updated from review comments, re-commented-out repository part for master * Original sha: 50d540df4c80ad4a069f4477df296c9015550d75 * Authored by LeeDr on 2016-07-25T15:52:16Z **Commit 3:** Change some indented numbered items to bullets * Original sha: ee42c473a926553849661ae421cc7140cceba1a3 * Authored by Lee Drengenberg on 2016-07-28T21:44:16Z * Committed by GitHub on 2016-07-28T21:44:16Z **Commit 4:** Update setup.asciidoc * Original sha: 9ccf1df7842a519154b9ebdb139ed90fccf63f7a * Authored by Lee Drengenberg on 2016-07-29T13:40:39Z * Committed by GitHub on 2016-07-29T13:40:39Z **Commit 5:** Update setup.asciidoc * Original sha: 48371a432d185f7f44f7e962810dac518d7a9130 * Authored by Lee Drengenberg on 2016-08-03T16:27:32Z * Committed by GitHub on 2016-08-03T16:27:32Z --- backport--instructions.rej | 83 ++++++++++++++++++++++++++++++++ backport-commit-message.rej | 35 ++++++++++++++ backport-guided-begin.rej | 12 +++++ backport-guided-finish.rej | 10 ++++ backport-wrangle-into-commit.rej | 12 +++++ 5 files changed, 152 insertions(+) create mode 100644 backport--instructions.rej create mode 100644 backport-commit-message.rej create mode 100755 backport-guided-begin.rej create mode 100755 backport-guided-finish.rej create mode 100755 backport-wrangle-into-commit.rej diff --git a/backport--instructions.rej b/backport--instructions.rej new file mode 100644 index 0000000000000..e1d49feb218e7 --- /dev/null +++ b/backport--instructions.rej @@ -0,0 +1,83 @@ +Backport of PR #7807 to branch 4.5 failed + +https://github.com/elastic/kibana/pull/7807 + + +- 2 patches failed to apply +- 0 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/7807/4.5 + git checkout jasper/backport/7807/4.5 + +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/7807/4.5 + + +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/7807/4.5 diff --git a/backport-commit-message.rej b/backport-commit-message.rej new file mode 100644 index 0000000000000..0c54c658448ee --- /dev/null +++ b/backport-commit-message.rej @@ -0,0 +1,35 @@ +Backport PR #7807 +--------- + +**Commit 1:** +Added 'Upgrading Kibana' section + +* Original sha: 32ed1ceb4daa4e82e70be738969360cfb95c61be +* Authored by LeeDr on 2016-07-22T18:25:11Z + +**Commit 2:** +Updated from review comments, re-commented-out repository part for master + +* Original sha: 50d540df4c80ad4a069f4477df296c9015550d75 +* Authored by LeeDr on 2016-07-25T15:52:16Z + +**Commit 3:** +Change some indented numbered items to bullets + +* Original sha: ee42c473a926553849661ae421cc7140cceba1a3 +* Authored by Lee Drengenberg on 2016-07-28T21:44:16Z +* Committed by GitHub on 2016-07-28T21:44:16Z + +**Commit 4:** +Update setup.asciidoc + +* Original sha: 9ccf1df7842a519154b9ebdb139ed90fccf63f7a +* Authored by Lee Drengenberg on 2016-07-29T13:40:39Z +* Committed by GitHub on 2016-07-29T13:40:39Z + +**Commit 5:** +Update setup.asciidoc + +* Original sha: 48371a432d185f7f44f7e962810dac518d7a9130 +* Authored by Lee Drengenberg on 2016-08-03T16:27:32Z +* Committed by GitHub on 2016-08-03T16:27:32Z \ No newline at end of file diff --git a/backport-guided-begin.rej b/backport-guided-begin.rej new file mode 100755 index 0000000000000..c688e1629e754 --- /dev/null +++ b/backport-guided-begin.rej @@ -0,0 +1,12 @@ +#!/bin/sh + +REMOTE="upstream" +BRANCH="jasper/backport/7807/4.5" +WORKING_BRANCH="tmp/$BRANCH" +STARTING_SHA="32ed1ceb4daa4e82e70be738969360cfb95c61be" +ENDING_SHA="48371a432d185f7f44f7e962810dac518d7a9130" + +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..c60b272f83b20 --- /dev/null +++ b/backport-guided-finish.rej @@ -0,0 +1,10 @@ +#!/bin/sh + +BRANCH="jasper/backport/7807/4.5" +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..578a97509e1f5 --- /dev/null +++ b/backport-wrangle-into-commit.rej @@ -0,0 +1,12 @@ +#!/bin/sh + +REMOTE="upstream" +BRANCH="jasper/backport/7807/4.5" +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