Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "PTP/Gerrit"

< PTP
(PTP Gerrit)
(PTP Gerrit)
Line 6: Line 6:
  
 
PART 1 - What PTP contributors need to do to add a proposed fix/patch  to Gerrit  
 
PART 1 - What PTP contributors need to do to add a proposed fix/patch  to Gerrit  
# Clone the repo
+
# Clone the repo (see Environment Setup page on wiki for more details)
# Configure the repo to use Gerrit (modify or create a remote that uses port 29418 or git.eclipse.org/r -- should be in Environment Setup page on wiki
+
# Open a new bugzilla entry if no entry exists yet
 
# Make changes
 
# Make changes
# Commit the changes (to local repo) making sure that the commit includes Signed-off-by and Change-Id lines#. Team>Remote>Push to Gerrit...
+
# Commit the changes (to local repo) making sure that the commit includes the bug id and Signed-off-by and Change-Id lines#. The bug id should be in the commit message, and the UI provides buttons for the additional lines. Team>Remote>Push to Gerrit...
  
 
See also [http://wiki.eclipse.org/CDT/git#Using_Gerrit_for_CDT  Using Gerrit for CDT] as our use should be similar/same.
 
See also [http://wiki.eclipse.org/CDT/git#Using_Gerrit_for_CDT  Using Gerrit for CDT] as our use should be similar/same.
  
PART 2 -  What a committer  needs to do to pull a gerrit patch in, see its changes, and later commit it to the repo to get in the build.
+
PART 2 -  What a committer  needs to do to review a patch (review changes, download the patch, and later commit it to the repo to get in the build).
  
# The change is presumably documented in a bugzilla bug, e.g. https://bugs.eclipse.org/bugs/show_bug.cgi?id=407003
+
# Navigating to a change
# Go to the URL for the change - should be in the list of PTP Gerrit changes at https://git.eclipse.org/r/#/q/status:open+project:ptp/org.eclipse.ptp,n,z  
+
#* Go to the URL for the change - should be in the list of PTP Gerrit changes at https://git.eclipse.org/r/#/q/status:open+project:ptp/org.eclipse.ptp,n,z
#* Each patch set represents a single commit
+
#* Click on the correct subject
# Open the Patch Set (e.g. open the top one in the list under the heading "File Path" for this bug 407003)
+
#* The most recent changes (patch set) should be open (each patch set represents a single commit)
#* Patch set actions:
+
# Reviewing a change
#** Click on each file (list under the "File Path" heading)  to see e.g, a diff viewer of the changes, comparing old and new.  Review the changes, add comments to the author in line if required
+
#* Click on each file (list under the "File Path" heading)  to see e.g, a diff viewer of the changes, comparing old and new.  Review the changes, add comments to the author in line if required
#** To add an inline comment, click on the line number on the far right in the diff viewer
+
#* To add an inline comment, click on the line number on the far right in the diff viewer
#*** Be sure to "Publish" later to make this comment visible to others
+
#* On the main screen, click on the "Review" button
#** The "Download" field on the main screen shows different ways of obtaining the changes in order to test in your local repo (from command line only)
+
#* If you wish to now vote
#*** Issue the command in the directory that is the location of the git repo.
+
#** Verified: choose +1, 0 or -1 (+1: downloaded and tested, 0: not tested (only code review), -1: doesn't work)
#*** this will create a new branch for the changes, change the repo so this is the default branch, and your eclipse workspace will be changed -- within a few seconds -- to show that branch.
+
#** Code Review: choose +2 to -2 - A +2 indicates approval of e.g. a committer - this accepts the change.
#*** Test this change within this new branch now in your workspace, if desired.
+
#** IP-Clean: +1, 0, -1  ( +1 is required to finish and push the change)
#** On the main screen, click on the "Review" button  
+
#* Overall comment can be entered at bottom as "Cover Message"
#*** Verified: choose +1, 0 or -1  
+
#* Be sure to "Publish Comments" in order for author/contributor to be notified and for comments to be visible
#*** Code Review: choose +2 to -2 - A +2 indicates approval of e.g. a committer - this accepts the change.
+
#* Once there is a +2 vote for "Code Review", +1 for "Verified", and +1 for "IP-Clean", use "Publish and Submit" to ...  to push the changes to the main repo
#*** IP-Clean: +1, 0, -1  ( +1 is required to finish and push the change)
+
# Downloading a change
#*** Overall comment can be entered at bottom as "Cover Message"
+
#* The "Download" field on the main screen shows different ways of obtaining the changes in order to test in your local repo (from command line only)
#**** Use  "Publish Comments" to add the comment only (so author/contributor is notified and can see it)
+
#* Issue the command in the directory that is the location of the git repo.
#**** Once there is a +2 vote, Use "Publish and Submit" to ...  to push the changes to the main repo
+
#* this will create a new branch for the changes, change the repo so this is the default branch, and your eclipse workspace will be changed -- within a few seconds -- to show that branch.
#**** To add an overall comment --another button at bottom appears "Add  Comment" 
+
#* Test this change within this new branch now in your workspace, if desired.
# FInally
+
# Finally
 
#* If the change is successful, at the bottom of the page, under "Comments" you will see "Change has been successfully merged into the git repository."
 
#* If the change is successful, at the bottom of the page, under "Comments" you will see "Change has been successfully merged into the git repository."
 
#* If the change is rejected, the contributor can upload a new patch set, then the process is repeated
 
#* If the change is rejected, the contributor can upload a new patch set, then the process is repeated

Revision as of 18:01, 11 December 2013

PTP Gerrit

UNDER DEVELOPMENT

What PTP contributors (committers and others) need to do for the basic tasks

PART 1 - What PTP contributors need to do to add a proposed fix/patch to Gerrit

  1. Clone the repo (see Environment Setup page on wiki for more details)
  2. Open a new bugzilla entry if no entry exists yet
  3. Make changes
  4. Commit the changes (to local repo) making sure that the commit includes the bug id and Signed-off-by and Change-Id lines#. The bug id should be in the commit message, and the UI provides buttons for the additional lines. Team>Remote>Push to Gerrit...

See also Using Gerrit for CDT as our use should be similar/same.

PART 2 - What a committer needs to do to review a patch (review changes, download the patch, and later commit it to the repo to get in the build).

  1. Navigating to a change
  2. Reviewing a change
    • Click on each file (list under the "File Path" heading) to see e.g, a diff viewer of the changes, comparing old and new. Review the changes, add comments to the author in line if required
    • To add an inline comment, click on the line number on the far right in the diff viewer
    • On the main screen, click on the "Review" button
    • If you wish to now vote
      • Verified: choose +1, 0 or -1 (+1: downloaded and tested, 0: not tested (only code review), -1: doesn't work)
      • Code Review: choose +2 to -2 - A +2 indicates approval of e.g. a committer - this accepts the change.
      • IP-Clean: +1, 0, -1 ( +1 is required to finish and push the change)
    • Overall comment can be entered at bottom as "Cover Message"
    • Be sure to "Publish Comments" in order for author/contributor to be notified and for comments to be visible
    • Once there is a +2 vote for "Code Review", +1 for "Verified", and +1 for "IP-Clean", use "Publish and Submit" to ... to push the changes to the main repo
  3. Downloading a change
    • The "Download" field on the main screen shows different ways of obtaining the changes in order to test in your local repo (from command line only)
    • Issue the command in the directory that is the location of the git repo.
    • this will create a new branch for the changes, change the repo so this is the default branch, and your eclipse workspace will be changed -- within a few seconds -- to show that branch.
    • Test this change within this new branch now in your workspace, if desired.
  4. Finally
    • If the change is successful, at the bottom of the page, under "Comments" you will see "Change has been successfully merged into the git repository."
    • If the change is rejected, the contributor can upload a new patch set, then the process is repeated
    • Watch emails and follow links for more information -- may provide more information.
    • Now switch your Eclipse workspace back to master (Rightmouse on a project, Team > Switch To > master) and do a pull (Team > Pull) and you should see the change come in.



We also plan to add an auto build step so that hudson will automatically try to build with the change (and run tests too). If the build succeeds, hudson will vote on the change. The Gerrit-based build is separate from the build based on code committed to the repository.

Back to the top