Partnering/Repacks/Policy and Process: Difference between revisions

From MozillaWiki
Jump to navigation Jump to search
Line 22: Line 22:
* export the changeset using <code>hg export REV</code>, where REV is the revision number of the changeset, e.g.:
* export the changeset using <code>hg export REV</code>, where REV is the revision number of the changeset, e.g.:
  $ PARTNERNAME=aol
  $ PARTNERNAME=aol
  $ hg export tip > repack_config_changes_for_$PARTNERNAME.diff
  $ hg export -g tip > repack_config_changes_for_$PARTNERNAME.diff


== Why create a patch? ==
== Why create a patch? ==

Revision as of 15:57, 30 July 2014

Version Control

Mozilla keeps all of our partner repack configuration files under version control in Mercurial (hg).

If you are unfamiliar with hg, Mozilla has some good dev resources for getting started:


The partner-repacks repository (repo) is publicly available here: https://hg.mozilla.org/build/partner-repacks

Creating a patch

This section assumes that you are already familiar with the basics of hg.

Here is a generalized workflow:

  • clone the partner-repacks repo
    • if you already have the repo, run hg pull && hg update -r default instead
  • make sure you don't have any existing changes in source clone by running hg status
  • make any necessary changes to your partner repack files
    • make sure you run hg add to add new files, or hg remove if you are removing files
  • commit changes to your local repository, hg commit ...
  • export the changeset using hg export REV, where REV is the revision number of the changeset, e.g.:
$ PARTNERNAME=aol
$ hg export -g tip > repack_config_changes_for_$PARTNERNAME.diff

Why create a patch?

All the partner repack configs are in version control. This lets us know when changes are made, who made them, and if something breaks, gives us the ability to revert back to a known-good version if there are problems.

If you're submitting changes for an existing repack, presumably you've already done some internal verification to make sure the changes are correct. By creating a patch of your changes as applied directly to the existing partner repacks configs in version control, you can be assured that your changes make it into the Mozilla system exactly as you intend.

If you provide a zip bundle of your changes (or simply a new xpi) instead of a patch, the first thing a Mozilla release engineer must do is unpack that bundle and manually move the new files into position against a copy of the repo. Mozilla release engineers are careful, but we aren't perfect. This is a manual process, and prone to error. We also don't know what your intentions are with some config changes. If there is any ambiguity in the bundle, files could end up in the wrong place.

Providing a exported patch against the configs in version control is the best way to ensure your changes are incorporated into the system as you expect.

Submitting a patch

The best way to submit a change to an existing partner repacks is via Bugzilla.

If you're new to bugzilla, the first step is to create an account.

To expedite the bug filing process, I've created a template that partners can use to quickly file bugs under the correct product & component:


Please remember to change $PARTNERNAME in the bug summary to reflect the partner you are submitting the config change for.

Add your exported diff of changes from hg as an attachment to the bug.

By default, you will automatically receive updates for any action taken on your bug. You can change which updates you receive in your Bugzilla Preferences.

Why use Bugzilla?

Mozilla release engineering uses bugzilla to track everything. If you don't submit your patch via bugzilla, the first thing the Mozilla release engineering team does is file a bug to cover the work to be performed and attach your submitted patch/bundle.

By filing your request directly in bugzilla, you automatically notify the correct people, have a record of your patch submission, and get updates whenever some performs an action on your ticket. You save the Mozilla team manual, potentially error-prone work, and get more ongoing insight into the process and the status of your request.