I am developing towards a gerrit repo which is used by a big open source community. To merge patches, we can't just push them but they need to be reviewed. Using the git cli, I do that using "git review" after committing the patch locally. I know how to 'git pull' changes and 'git push' patches using IntelliJ but I don't know how to 'git review' patches. Does anybody know if this is supported and how to use it?
2 Answers
You can submit the patches to gerrit after you install the plugin from repository.
- GoTo
File
->settings
->plugins
- Search for
gerrit
from the repository and install it - After installation, restart the IDEA
- Then GoTo
File
->settings
->version control
- Select
Gerrit
and submit theweb-url
,Login
,Password
- Now you can submit the patches to Gerrit.
Since it uses RestAPI, you'll probably need to add HTTP Password (your Git SSH password won't work).
For example, to use gerrit for Openstack projects, you should create an HTTP password at: https://review.openstack.org/#/settings/http-password
Notice that in PyCharm Gerrit Settings, the Web-URL is not the same as the Git URL:
https://review.openstack.org

- 15,216
- 3
- 86
- 85
git review
is not a default git command, it is a third-party tool that executes a series of git commands for you. Thus it is not directly supported.
Since git-review execute a series of git commands (like rebase and push), you could manually do the same using IDEA features. THe steps it does is described on the wiki
Also, there are plugins for Gerrit available. E.g. https://github.com/uwolfer/gerrit-intellij-plugin

- 7,073
- 1
- 19
- 29
-
And here is the request to add native Gerrit support to IDEA https://youtrack.jetbrains.com/issue/IDEA-60528 – Dmitrii Smirnov May 17 '17 at 13:44