The bots will automatically detect if the commit in a backport pull request is a clean backport. If it is then bots will add the label "clean" to the pull requests. There is also a user command
/clean, which can be used to manually label a backport as clean. Backport pull requests classified as a clean backport can be integrated without reviewers in some repositories (configurable per repository). This means that not all commit messages for backport commits will have a "Reviewed-by" line.
The /backport commit command and /backport pull request command can be used to quickly create a backport pull request for a given commit. Just navigate to the original commit or pull request in source code hosting provider's web UI and add a comment consisting of
/backport <repo> [<branch>]. If the commit does not apply clean cleanly on the target repository then a message will be shown for the files with conflicts.
The pull request will be created from a branch in a shared fork of the target repository. On GitHub, this repository is owned by the openjdk-bots organization. The first time you issue the /backport command for a specific target repository, you will receive an invitation to collaborate in this the fork repository. This invitation needs to be accepted to be able to further update the backport pull request with more changes.
Navigate the to commit intended to be backported in the source code hosting provider's web UI and issue the /backport commit command. If the commit applied cleanly onto the target repository then go to the pull request linked Use the link in the reply and issue the /integrate to create to the pull request command.
If the commit did not apply cleanly then the commit must be backport manually and backport pull request must be created manually. See the CLI section for an example of how to do this using the command-line.
In either of the above cases, once the PR is marked as "ready", issue the /integrate pull request command.
If the commit applied cleanly onto the target repository then you can create a pull request and integrate . Once it is marked as "ready", integrate it with git-pr integrate, for example:
The output from the final
git push will return a link that can be used to create the pull request.
In addition to "Backport <hash>", "Backport JDK-XXXXXXX" also seems to work.
Backporting from mercurial