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.
Difference between revisions of "EMF Compare/Gerrit"
(→About Git Commit Messages) |
(→Requesting a Review) |
||
Line 97: | Line 97: | ||
The implementation is functional for control/uncontrol changes, as well | The implementation is functional for control/uncontrol changes, as well | ||
as addition/deletion of roots in a resource. | as addition/deletion of roots in a resource. | ||
+ | |||
+ | ==Gerrit Change-Id== |
Revision as of 04:13, 17 January 2013
Contents
Configuring the repository
This guide outlines a number of command line instructions. They can be followed on either linux or windows, use a console (linux) or msysgit (windows).
Creating a User Account
- You need an Eclipse user account. You already have one if you are an Eclipse commiter or have a Bugzilla account. Otherwise, use this form.
- You should now be able to logon to the Gerrit Web UI (top-right corner of the page) using the email address you registered with your Eclipse (and/or Bugzilla) account and your Eclipse password.
Update repository information
Your user name and email should match the information you've provided to Eclipse. From the command line, use the following (change any <bold> text to your own info) :
$ cd <path/to/repository> $ git config --local user.name "<Full Name>" $ git config --local user.email "<your.mail@yourmail.com>"
SSH
- Your username is what is displayed in Gerrit.
- You need to upload your public SSH key here. Follow the instructions below if you do not know how.
Generating and uploading SSH keys
First of all, please follow the guide on Github up to (and excluding) Step 4.
You now have a public SSH key, you need to upload it to gerrit.
First, use the following command :
$ clip < ~/.ssh/id_rsa.pub
This will copy your full SSH key in the clipboard.
Then, in the settings of Gerrit, click "Add Key".
Do not enter anything manually, simply right-click the text field that appears and select "Paste". Click the Add button without changing the pasted text.
Adding a new remote
Using the command line or msysgit, use the following (change any bold text to your own info, remember that your username is displayed here) :
$ cd <path/to/repository> $ git config remote.review.url ssh://<username>@git.eclipse.org:29418/emfcompare/org.eclipse.emf.compare.git $ git config remote.review.push HEAD:refs/for/master
This will allow you to push review requests on the Gerrit of EMF Compare using only :
$ git push review
Note that your commit messages will need to contain a Change-Id for the review. See the guidelines below.
Requesting a Review
About Git Commit Messages
Your commit message must follow the proper guidelines, as follows (from the Git WikiBook):
Short (50 chars or less) summary of changes (does NOT end with a full stop) More detailed explanatory text, if necessary. Wrap it to about 72 characters or so. In some contexts, the first line is treated as the subject of an email and the rest of the text as the body. The blank line separating the summary from the body is critical (unless you omit the body entirely); tools like rebase can get confused if you run the two together. Write your commit message in the present tense: "Fix bug" and not "Fixed bug." This convention matches up with commit messages generated by commands like git merge and git revert. Further paragraphs come after blank lines. - Bullet points are okay, too - Typically a hyphen or asterisk is used for the bullet, preceded by a single space, with blank lines in between, but conventions vary here - Use a hanging indent
if your are fixing a bug from the Eclipse Bugzilla, please prefix your first commit message line with the bug number between brackets.
Examples
Short commit (title line is self-explanatory or is linked to a bugzilla that explains it all) :
[398082] add gerrit to EMF Compare
Reveal the selection when possible
Complex commit (title line is only a summary, with more detailed explanations about what has been done in the comment "body") :
Resource attachment completion. We now detect resource attachment changes not only for root matches, but also for cross references. This allows us to detect a wider range of potential changes, notably the control/uncontrol case. The implementation is functional for control/uncontrol changes, as well as addition/deletion of roots in a resource.