• About
    • About WebM
    • FAQ
    • Discuss
    • Supporters
  • Developer
    • Overview & Code Repos
    • Contribute
    • Submitting Patches
    • Code Reviews
    • Workflow
    • Conventions
    • Bug Reporting
    • Build Prerequisites
    • Repository Layout
    • Releases
    • Roadmap
    • Hardware
  • Docs
    • libvpx API
    • RFC 6386: VP8 Data Format
    • WebM Container Format
    • VP8 RTP Proposal (Draft)
    • Encoder Examples
    • Wiki
  • Tools
  • Licenses
  • Blog
  • Home >
  • Code >
  • Contribute >
  • Submitting Patches

Submitting Patches

Show Contents

  • Create An Account
    • Contributor Agreement
    • Create or Upload your SSH Public Key
  • Set-up Your Local Repository
    • commit-msg Hook
  • Upload Your Change
  • Incorporating Comments
  • Submitting your Change
  • Viewing the status of uploaded changes

This page documents how to submit your changes to us for inclusion.

We manage the submission of patches using the Gerrit code review tool. This tool implements a workflow on top of the Git version control system to ensure that all changes get peer reviewed and tested prior to their distribution.

Create An Account

Browse to http://gerrit.chromium.org/ and complete the registration process. You must register using OpenId. OpenId provides secure single-sign-on, so you don’t need to create a new account or remember another password. If you have a Google account or a Yahoo ID, you’re all set. There are many other OpenID providers available. You may already have an OpenID. OpenID does not reveal your passwords to us.

Contributor Agreement

You will be required to execute a contributor agreement to ensure that the WebM Project has the right to distribute your changes. Individuals can execute the agreement online. Corporations must submit the agreement via mail or fax.

Create or Upload your SSH Public Key

You must have an SSH public key to upload changes to Gerrit. GitHub has some good guides to creating these keys if you haven’t done this before. This is just a guide — you don’t have to sign up for GitHub to contribute to WebM.

  • https://help.github.com/articles/generating-ssh-keys

Set-up Your Local Repository

Look-up the URL for the project you’d like to work on, listed under pull on our Code page. The URL uses the git:// protocol.

To clone the project repository on your local machine, give a command similar to the following:

$ git clone http://git.chromium.org/webm/libvpx.git ~/working

The above creates a clone of the repo at ~/working/libvpx.

commit-msg Hook

Gerrit requires that each submission include a unique Change-Id. You can assign one manually using git commit --amend, but it’s easier to automate it with the commit-msg hook provided by Gerrit.

Copy commit-msg to the .git/config directory of your local repo. Example:

$ scp -p -P 29418 gerrit.chromium.org:hooks/commit-msg .git/hooks/

See the Gerrit documentation for more information.

Upload Your Change

Find the correct URL to push to on the main code page and determine the branch you want your change to start on by looking at our repository layout. You can set up your Git and SSH configurations to simplify this command line quite a bit. See the Gerrit documentation for more information. The command you’ll use is of the general form:

$ git push ssh://gerrit.chromium.org:29418/webm/projectname HEAD:refs/for/branchname

Incorporating Comments

If you previously uploaded a change to Gerrit and the Approver has asked for changes, follow these steps:

  • Edit the files to make the changes the Approver has requested.

  • Recommit your edits using the --amend flag, for example:

    $ git commit -a --amend

  • Use the same git push command as above to upload to Gerrit again for another review cycle.

In general, you should not rebase your changes when doing updates in response to review. Doing so can make it harder to follow the evolution of your change in the diff view.

If your commit does not include a ‘Change-Id:’ line in its commit message (see commit-msg Hook, above), you’ll have to add one. Do so by running git commit --amend to edit the commit message, and then create a ‘Change-Id: I …’ by using the ID number of the change you’re trying to update, which can be found using the web UI.

Submitting your Change

Once your change has been Approved and Verified, you can “submit” it through the Gerrit UI. This will usually automatically merge your change into the branch you specified, creating a new merge commit in Git if neccessary. Sometimes this can’t be done automatically. If you run into this problem, you must rebase or merge your changes manually. We strongly prefer that you rebase your changes instead of merging them. To do so, run:

$ git fetch
$ git rebase origin/branchname

If you get any conflicts, resolve them as you normally would with git. When you’re done, reupload your change.

Viewing the status of uploaded changes

To check the status of a change that you uploaded, open Gerrit, sign in, and click My > Changes.

About
  • About WebM
  • FAQ
  • Discuss
  • Supporters
More
  • Tools
  • Hardware
  • Licenses
  • Downloads
Developer
  • Overview
  • Contribute
  • Submitting Patches
  • Code Reviews
  • Workflow
  • Conventions
  • Bug Reporting
  • Build Prerequisites
  • Repository Layout
  • Releases
  • Roadmap
Docs
  • libvpx API
  • RFC 6386: VP8 Data Format
  • WebM Container Format
  • VP8 RTP Proposal (Draft)
  • Encoder Examples
  • Wiki
Copyright 2010 - 2013
The WebM Project
HTML5 Powered with CSS3 / Styling, and Semantics
Follow @WebM
webmaster@webmproject.org