Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

SWT/Devel/Gerrit

< SWT‎ | Devel

Configure Repository for Gerrit review

Edit your git config file from the swt repository:

 vi .git/config

Then add the review branch:

 [remote "review"]
   url = ssh://YOUR_GERRIT_USER_NAME@git.eclipse.org:29418/platform/eclipse.platform.swt.git
   push = HEAD:refs/for/master

Substitute YOUR_GERRIT_USER_NAME with your username like 'lufimtsev', not your full email address. Now you can push patches to review

 git push review

Reviewing Changes

Fetching changes from Gerrit into Eclipse

For simplicity and ease of use, you can fetch changes from Gerrit into Eclipse using Egit (this assumes you have it installed).

To do so, you must know the Gerrit change number, and have your git config set up for review. Note: change number is not the same as change-ID.

To find the change number, go to the gerrit review you intend to fetch and look at the URL to see the change number:

 git.eclipse.org/r/#/c/change_number_will_be_here/ 

You can also look at the header above the commit message, "Change <change_number>".

To fetch it, right click the repository in Eclipse that contains the change, and select "Fetch from Gerrit..." The following window will appear:

Fetch from Gerrit window


Enter the change number from Gerrit and press Ctrl + Space. Eclipse will pull information for the change and provide a drop down menu of patch sets to choose from. Choose the patch set you wish to fetch.

If you wish to create a separate branch with these changes, keep the default selected option and enter a branch name.

If you want the changes applied against the branch you are currently on, select the "Checkout FETCH_HEAD" option. Click finish and Eclipse will fetch the changes into your workspace.

Identifying dependencies between patches

Sometimes you want to know which patches have to be pushed to master before your patch can be merged (dependencies).

"Related changes" will pop up if there are related changes (e.g your patch depends on another patch, or it's a pre-requisite for another patch).

In older versions of gerrit, there were explicit titles for 'parent' patches and 'child' patches. However now one thing to note is that the related changes are listed the same way a 'git-log' is listed. Meaning all dependencies will appear below the current patch etc... Please see documentation for details: [[1]]

Back to the top