• About
    • About WebM
    • Press Info
    • FAQ
    • Discuss
    • Supporters
    • VP9 Codec
  • Developer
    • Overview & Code Repos
    • Contribute
    • Submitting Patches
    • Code Reviews
    • Workflow
    • Conventions
    • Continuous Integration
    • Bug Reporting
    • Build Prerequisites
    • Repository Layout
    • Releases
    • Roadmap
  • Docs
    • Draft VP9 Bitstream Format
    • VP Codec ISO Media File Format Binding (MP4)
    • VP9 Levels and Decoder Testing
    • RFC 6386: VP8 Data Format
    • WebM Container Format
    • WebM Encryption
    • VP8 RTP Proposal (Draft)
    • Encoder Examples
    • Wiki
  • Tools
  • Home >
  • Code >
  • Contribute >
  • Submitting Patches

Submitting Patches

Show Contents

  • Login Cookie
    • Contributor Agreement
  • 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.

Login Cookie

Browse to https://chromium.googlesource.com/ and login with your Google account (Gmail credentials, for example). Next, follow the Generate Password link at page top. You'll be given instructions for creating a cookie to use with our Git repos.

Contributor Agreement

You will be required to execute a contributor agreement to ensure that the WebM Project has the right to distribute your changes.

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.

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

$ git clone https://chromium.googlesource.com/webm/libvpx ~/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/hooks directory of your local repo. Example:

$ curl -Lo <local repo>/.git/hooks/commit-msg https://chromium-review.googlesource.com/tools/hooks/commit-msg

Next, ensure that the downloaded commit-msg script is executable:

$ chmod u+x <local repo>/.git/hooks/commit-msg

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 https://chromium-review.googlesource.com/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
  • Licenses
  • Downloads
  • VP8 Cross-License
Developer
  • Overview
  • Contribute
  • Submitting Patches
  • Code Reviews
  • Workflow
  • Conventions
  • Bug Reporting
  • Build Prerequisites
  • Repository Layout
  • Releases
  • Roadmap
Docs
  • WebM Codec SDK
  • WebM Container Format
  • WebM Encryption
  • VP8 RTP Proposal (Draft)
  • RFC 6386: VP8 Data Format
  • Encoder Examples
  • Wiki
Copyright 2010 -
The WebM Project
HTML5 Powered with CSS3 / Styling, and Semantics
webmaster@webmproject.org