...
Make sure the
backport
tool is installed:go install github.com/beneschcockroachdb/backport@latest
For first time setup, you will need to set the
cockroach.remote
git config option. Rungit config cockroach.remote <myfork>
where<myfork>
is the remote in which your fork of cockroach is, e.g.origin
. You might also need to add$GOPATH/bin
to your$PATH
.
Run
backport -r VV.V xxxxx
, whereVV.V
is replaced by the version number of the release branch andxxxxx
is replaced by the GitHub PR number of the PR you are trying to backport, or a space-separated list of PR numbers.
This will automatically create a backport branch and upload it to your repository against the release branch to GitHub.
Then, it will try to open your browser to create a new PR with that branch, or provide instruction on how to do this manually if it cannot open your browser.If there were merge conflicts,
backport
will halt and ask you to fix them. Once they're fixed, runbackport --continue
to continue the procedure.If there were any non-trivial merge conflicts, be sure to call those out in the PR message so reviewers can pay closer attention to the diff.
If something goes wrong, you can use
backport --abort
to give up on the current manual backport.
...