Developer Days München
                              12. - 15. April 2012




Making you a GIT hero
   Part 3/3: Gerrit
Developer Days München
                                 12. - 15. April 2012



Your Presenter

Hi,

I’m Steffen!



Please give me feedback
about this presentation!



steffen.gebert@typo3.org

@StGebert on Twitter
Developer Days München
                                                                                  12. - 15. April 2012



           I live in Würzburg

                                                       Studied Computer science there




Photo by Juergen Mangelsdorf (CC)
http://www.flickr.com/photos/22084572@N07/2217991811/
Developer Days München
                                                             12. - 15. April 2012



           Day-to-day Job

      Now PhD student and researcher

          • Network and Cloud Security

          • Core Network Routing




Photo by Paul Soler-Moya (CC)
http://www.flickr.com/photos/40351463@N00/3927504524/
Developer Days München
                               12. - 15. April 2012



TYPO3 Core Team Member
Developer Days München
                                       12. - 15. April 2012



TYPO3.org Server Admin Team Member
Developer Days München
                                                       12. - 15. April 2012



Questions!

 • Who already worked with Git (besides yesterday/today)?

 • Who already worked with Gerrit?

 • Who already has a Gerrit setup?

 • Who knows, what Gerrit is?
Developer Days München
                                             12. - 15. April 2012



What’s Gerrit?

 • Gerrit is for Quality Assurance!

 • Make sure that the author does it
Developer Days München
                                                           12. - 15. April 2012



Preparation

 • Please clone the Sandbox project:




        git clone --recursive git://git.typo3.org/
                       Sandbox.git
Developer Days München
                                                         12. - 15. April 2012



About Gerrit

 • Web-based Code Review Software

 • Git server, SSH server

 • Written in Java

 • Developed by Google (for Android Development)

 • Relies on Git as Version Control System (VCS)

 • Gatekeeper in front of the Git repositories

 • .. and the reason, why TYPO3 migrated to Git
Developer Days München
                                     12. - 15. April 2012




Git Architecture




Git with Gerrit Architecture
Developer Days München
                                                        12. - 15. April 2012



Gerrit Usage in TYPO3 world

Gerrit is used by

 • TYPO3v4/v6

    • workspaces, extbase, fluid, .. Subprojects

 • FLOW3

 • Phoenix

 • Few elitist extensions

    • news, community, extension_builder

 • Working hard on support for community extensions!
Developer Days München
                                                      12. - 15. April 2012



Ages ago...

 • Reviews using the TYPO3 Core Team Mailing list
Developer Days München
                                      12. - 15. April 2012



Reviews through Mailing Lists
Developer Days München
                                                            12. - 15. April 2012



Reviews through Mailing Lists

Keeping track of changes was.. well.. a manual job!
Developer Days München
                                      12. - 15. April 2012



Back to Gerrit!

 • that’s where you find it:

   • https://review.typo3.org
Developer Days München
                                                            12. - 15. April 2012



Software Reviews

 • All code contains errors, more or less

 • Easier to spot them with four, six, eight, ..., eyes

 • No code must be merged without review



 • Review types

   • Functional review

   • Code review
Developer Days München
                                                      12. - 15. April 2012



Functional Review

 • Make sure that a change

   • fixes the bug / implements the feature as advertised

   • doesn’t hurt other functionality

   • is robust



 • Testing methods

   • Automatic (Selenium, Unit Test)

   • Manual (your browser + your mouse + your brain)
Developer Days München
                                                      12. - 15. April 2012



Code Review

 • The change to the code

   • is correct (it does, what it should do)

   • is well-coded (robust, performant, etc.)

   • respects Coding Guide Lines (TYPO3 CGL)



 • Testing methods

   • Automatic: CGL, Unit tests

   • Manual: Reading the code
Developer Days München
                                                    12. - 15. April 2012



Required Votes

 • Votings required to merge a change:


                                     Code
                       Verified
                                    Review
          Team
                      ✓ (+2)        ✓ (+2)
         Member

         Anyone          +1              +1

 • More reviews are welcome!

 • Merging happens by team member pressing a “Submit”
Developer Days München
                                                   12. - 15. April 2012



Git Help

 • The best™ Git Documentation ever:

   • http://wiki.typo3.org/Git

 • Please set up the Gerrit commit hook

   • Contribution Walkthrough with Command Line
Developer Days München
                                                   12. - 15. April 2012



 Pushing a Change to Gerrit


   git push origin HEAD:refs/for/<release-branch>




   the remote to push to
(could be also github, etc.)
Developer Days München
                                                 12. - 15. April 2012



Pushing a Change to Gerrit


 git push origin HEAD:refs/for/<release-branch>




    state of your   pseudo-branch target branch
    working tree       in Gerrit     (master,
                                  TYPO3_4-6)

Gerrit Workshop

  • 1.
    Developer Days München 12. - 15. April 2012 Making you a GIT hero Part 3/3: Gerrit
  • 2.
    Developer Days München 12. - 15. April 2012 Your Presenter Hi, I’m Steffen! Please give me feedback about this presentation! steffen.gebert@typo3.org @StGebert on Twitter
  • 3.
    Developer Days München 12. - 15. April 2012 I live in Würzburg Studied Computer science there Photo by Juergen Mangelsdorf (CC) http://www.flickr.com/photos/22084572@N07/2217991811/
  • 4.
    Developer Days München 12. - 15. April 2012 Day-to-day Job Now PhD student and researcher • Network and Cloud Security • Core Network Routing Photo by Paul Soler-Moya (CC) http://www.flickr.com/photos/40351463@N00/3927504524/
  • 5.
    Developer Days München 12. - 15. April 2012 TYPO3 Core Team Member
  • 6.
    Developer Days München 12. - 15. April 2012 TYPO3.org Server Admin Team Member
  • 7.
    Developer Days München 12. - 15. April 2012 Questions! • Who already worked with Git (besides yesterday/today)? • Who already worked with Gerrit? • Who already has a Gerrit setup? • Who knows, what Gerrit is?
  • 8.
    Developer Days München 12. - 15. April 2012 What’s Gerrit? • Gerrit is for Quality Assurance! • Make sure that the author does it
  • 9.
    Developer Days München 12. - 15. April 2012 Preparation • Please clone the Sandbox project: git clone --recursive git://git.typo3.org/ Sandbox.git
  • 10.
    Developer Days München 12. - 15. April 2012 About Gerrit • Web-based Code Review Software • Git server, SSH server • Written in Java • Developed by Google (for Android Development) • Relies on Git as Version Control System (VCS) • Gatekeeper in front of the Git repositories • .. and the reason, why TYPO3 migrated to Git
  • 11.
    Developer Days München 12. - 15. April 2012 Git Architecture Git with Gerrit Architecture
  • 12.
    Developer Days München 12. - 15. April 2012 Gerrit Usage in TYPO3 world Gerrit is used by • TYPO3v4/v6 • workspaces, extbase, fluid, .. Subprojects • FLOW3 • Phoenix • Few elitist extensions • news, community, extension_builder • Working hard on support for community extensions!
  • 13.
    Developer Days München 12. - 15. April 2012 Ages ago... • Reviews using the TYPO3 Core Team Mailing list
  • 14.
    Developer Days München 12. - 15. April 2012 Reviews through Mailing Lists
  • 15.
    Developer Days München 12. - 15. April 2012 Reviews through Mailing Lists Keeping track of changes was.. well.. a manual job!
  • 16.
    Developer Days München 12. - 15. April 2012 Back to Gerrit! • that’s where you find it: • https://review.typo3.org
  • 17.
    Developer Days München 12. - 15. April 2012 Software Reviews • All code contains errors, more or less • Easier to spot them with four, six, eight, ..., eyes • No code must be merged without review • Review types • Functional review • Code review
  • 18.
    Developer Days München 12. - 15. April 2012 Functional Review • Make sure that a change • fixes the bug / implements the feature as advertised • doesn’t hurt other functionality • is robust • Testing methods • Automatic (Selenium, Unit Test) • Manual (your browser + your mouse + your brain)
  • 19.
    Developer Days München 12. - 15. April 2012 Code Review • The change to the code • is correct (it does, what it should do) • is well-coded (robust, performant, etc.) • respects Coding Guide Lines (TYPO3 CGL) • Testing methods • Automatic: CGL, Unit tests • Manual: Reading the code
  • 20.
    Developer Days München 12. - 15. April 2012 Required Votes • Votings required to merge a change: Code Verified Review Team ✓ (+2) ✓ (+2) Member Anyone +1 +1 • More reviews are welcome! • Merging happens by team member pressing a “Submit”
  • 21.
    Developer Days München 12. - 15. April 2012 Git Help • The best™ Git Documentation ever: • http://wiki.typo3.org/Git • Please set up the Gerrit commit hook • Contribution Walkthrough with Command Line
  • 22.
    Developer Days München 12. - 15. April 2012 Pushing a Change to Gerrit git push origin HEAD:refs/for/<release-branch> the remote to push to (could be also github, etc.)
  • 23.
    Developer Days München 12. - 15. April 2012 Pushing a Change to Gerrit git push origin HEAD:refs/for/<release-branch> state of your pseudo-branch target branch working tree in Gerrit (master, TYPO3_4-6)

Editor's Notes