submitting and reviewing changes lab guide
TRANSCRIPT
Submitting Changes © Cisco and/or its affiliates. All rights reserved. 2
Overall Objectives This lab will guide you through the process of configuring an Ubuntu workstation to submit OpenStack potential changes for acceptance review by the community.
1. Install git and git-‐review 2. Configure git 3. Download test source code and make test changes to it 4. Review test changes at review.openstack.org
Submitting Changes © Cisco and/or its affiliates. All rights reserved. 3
Install git and git-‐review Log into your Ubuntu 14.04 VM. At a command prompt, run the command: sudo apt-‐get update && sudo apt-‐get install git git-‐review
Configure git At a command prompt on your Ubuntu 14.04 VM, run the command: git config -‐-‐global user.name "Your Name" git config -‐-‐global user.email [email protected] Note that you should use the name and email address you used when filling out the OpenStack Foundation membership and review.openstack.org account form.
Download test code and submit changes At a command prompt on your Ubuntu 14.04 VM, run the command: git clone git://git.openstack.org/openstack-‐dev/sandbox This will check out a copy of the “sandbox” test code to your machine. Then, change directories to the sandbox code and run the git review -‐s command to configure it for submission to gerrit cd sandbox git review -‐s Next, make a new branch, and make changes in that branch. You may make whatever changes you like but one example change is shown here in these commands: git checkout -‐b testbranch origin/master touch I_was_here git add I_was_here git commit -‐m "Added bookmark file" This will submit the changed code to gerrit for automated and human review, and will return a URL which you can access to monitor the review process. A successful session will look like:
Submitting Changes © Cisco and/or its affiliates. All rights reserved. 4
$ git review remote: Resolving deltas: 100% (1/1) remote: Processing changes: new: 1, refs: 1, done remote: remote: New Changes: remote: https://review.openstack.org/188911 remote: To ssh://openstax-‐[email protected]:29418/openstack-‐dev/sandbox.git * [new branch] HEAD -‐> refs/publish/master/testbranch $
Submitting Changes © Cisco and/or its affiliates. All rights reserved. 5
Review submitted changes To review the changes, go to the URL returned when you submitted the proposed change via git review. You should see a screen which looks like:
You can use this form to examine the proposed change and look at side-‐by-‐side diff output for each file which is proposed to be changed: