Services/Sync/Getting Started

From MozillaWiki
Jump to navigation Jump to search

Using Bugzilla

TODO

Using Mercurial

Mozilla's development process is very much patch driven. Mercurial Patch Queues, although a bit awkward to use at times, fit this process rather well. It is recommended you familiarize yourself with them and use them.

Configuration

Marco Bonardo has some general purpose tips for Mozilla developers on how to format patches before uploading them to Bugzilla.

Essentially it is recommended you put the following in your ~/.hgrc:

 [ui]
 username = Your Name <you@mozilla.com>
 
 [extensions]
 hgext.mq = 
 
 [diff]
 git = 1
 unified = 8
 
 [defaults]
 diff = -pU8
 qdiff = -pU8
 qnew = -U
 qseries = -sv

Repositories

fx-sync

Sync is primarily developed in the fx-sync repository. Things that live there:

  • The Services client libraries in services/crypto/ and services/sync.
  • The Firefox Sync add-on in addon/*
  • The Firefox 3.x and Fennec 1.x UIs for the Sync add-on in ui/*

mozilla-central

mozilla-central is the repository for Firefox and the base repository for other Mozilla-based applications. How mozilla-central is relevant to Sync:

  • The client library is periodically merged from fx-sync to mozilla-central.
  • The integrated UI for Firefox Sync lives in browser/base/*, along with the rest of the Firefox UI.

Merging fx-sync to mozilla-central

Often it's necessary to do merge fx-sync to mozilla-central yourself so you can develop on an up-to-date version of Sync within mozilla-central before it actually lands. And of course if you actually want to push this to mozilla-central (note that you almost certainly want a tracking bug for this.)

Steps to perform for the merge:

  1. You need a patched version of Mercurial, so get a checkout of Mercurial's source, apply Mardak's keep-rename patch, and build Mercurial.
  2. Check out a clean copy of fx-sync.
  3. Export the repository to something we can import into mozilla-central with
tools/convert.sh

This creates a new repository next to the existing checkout called fx-sync.converted

  1. Check out or update a copy of mozilla-central and do
hg pull -f .../fx-sync.converted
  1. Merge the newly created head with
hg merge
  1. Commit the merge with
hg commit

Don't forget to reference the tracking bug if you intend to push this to mozilla-central