8
edits
Changes
Various updates
= Using Bugzilla =
Every code change starts out as a bug in [https://bugzilla.mozilla.org Bugzilla] where the general approach can be discussed. The bug should eventually be assigned to somebody who will upload one or more patches for review. Code can only be reviewed by module owners and their peers; see [[Services/Code_Review|code review policy]] for more information. If the review has been granted and all review comments have been addressed, the patches may be checked into [https://hg.mozilla.org/services/services-central services-central], which is the Mercurial repository used for Services client work. On rare occasions it will make more sense to land work on [http://hg.mozilla.org/mozilla-central mozilla-central] instead — for example, if a change needs to propagate upstream before the regular [[Services/Process/MergingBetweenBranches|merge from services-central to mozilla-central]]. This might involve additional procedures (e.g., you need to request approval in addition to review.)
For server code written in Python, Tarek has provided a useful tool called [https://bitbucket.org/tarek/flake8 flake8] which does Python style checks against your code.
= Using Mercurial =
Note: This section may be outdated.
Mozilla's development process is very much patch driven. [https://developer.mozilla.org/En/Developer_Guide/Source_Code Mozilla uses Mercurial] (as well as git for some projects) as the version control system. [https://developer.mozilla.org/en/Mercurial_queues 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 ==
== Landing patches ==
You have items in a patch queue that you'd like to push to sm-c. Here's the thorough set of steps to follow to get them into the tree (assuming you have commit access, of course). It's recommended that you use autoland via mozreview, or flag bugs as having checkin-needed instead.
=== Make sure services-central is open and green ===
Check [https://tbpltreeherder.mozilla.org/?tree=Services-Central TBPLtreeherder].
=== Make sure your tree is up to date ===
=== Run tests ===
Now is a great time to run tests, because this is the state in which servicesmozilla-central will be after you push. If you apply a <tt>tests</tt> patch to re-enable disabled tests, ''make sure you pop it when you're done''.
=== Finish the applied patches ===
= Using Git =
Various projects exist as Git repositories instead of Mercurial repositories. Even when projects are officially hosted in Mercurial, Git mirrors are maintained. The Services team maintains a GitHub organization mozilla-central mirror is available at https://github.com/mozilla/gecko-servicesdev, however we recommend that you use https://github. com/glandium/git-cinnabar/wiki/Mozilla:-A mirror of services-git-workflow-for-Gecko-development to set up a local git repository that tracks mozilla central . If you already have a gecko-dev clone, you can be found at use [https://github.com/mozillaglandium/git-servicescinnabar/wiki/servicesMozilla:-Using-a-git-clone-of-gecko%E2%80%90dev-to-push-to-centralmercurial this guide] to configure it to push to hg using git-cinnabar.
== Configuring Git ==
$ git config --global user.name "John Doe"
$ git config --global user.email "johndoe@mozilla.com"
# Enable color output for all commands
$ git config --global color.branch auto
$ git config --global color.status auto
$ git config --global color.ui auto
# Highlight whitespace
$ git config --global core.whitespace "trailing-space,space-before-tab,tab-in-indent"
# Define your editor for commits, other tools
$ git config --global core.editor vim
After setting up
= Repositories =
Getting a checkout of a large Mercurial repository can be a pain if you're remote. Nobody wants to wait 6 hours while Python drools on its shoes. The answer is '''bundles'''. [https://developer.mozilla.org/en/Mozilla_Source_Code_%28Mercurial%29 Follow the directions]. The services-central bundle More information on bundles is [http://ftp.mozilla.org/pub/mozilla.org/firefox/bundles/services-central.hg here]. == services-central == available [https://hgdeveloper.mozilla.org/services/services-central services-central] is the clone of mozilla-central in which the Sync client (and other stable Services client-side projects) are developed. Things that live there: * The Services client libraries in services/crypto/ and services/sync. * Builten-in UI in browserUS/base/content/. == fx-sync == Sync was primarily developed in the [https:docs/Mozilla/hg.mozilla.orgDeveloper_guide/servicesSource_Code/fx-syncMercurial/ fx-syncBundles here] repository. The code there includes support for the Sync add-on; it's deprecated since Firefox 4. 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 Sync code used to Sync: * live in a repository named services-central is [[Services/Process/MergingBetweenBranches|periodically merged into mozilla-central]]. * The integrated UI , however currently all client side sync code for Desktop Firefox and Firefox Sync for Android lives in browser/base/*, along with the rest of the Firefox UI. * Firefox releases are spun from mozilla-central. Changes made to services-central don't directly reach users.
== Try server ==
To push to try, teave your changes as applied mq patches. Then run:
hg push -f ssh://hg.mozilla.org/try/
Alternatively, you can push to try using `mach try`, which works for both `git` and `hg` users (assuming git users are using git cinnabar), and is recommended for both.
= Testing =
[https://developer.mozilla.org/en/Writing_xpcshell-based_unit_tests Writing xpcshell-based unit testing]. ==Python Functional Tests== In the services/ tree Sync tests are a handful of HTTP servers implemented in JS. These are effectively lightweight clones of the services described by the specs located at http[https://docs.servicessearchfox.org/mozilla.com-central/source/. The main implementations of these services are in Python. And, there exist a Python test suite that you can point at any HTTP endpoint and they will validate the functional behavior of the server. We use these Python functional /sync/tests to validate that the in-tree JS server implementations are functionally proper. To run these functional /unit/ /services/sync/tests, you'll need a built Firefox source tree and will need to obtain the Python server code, which contains the tests./unit]
= Collaboration =
}
{
comment = "Public channel for IdentityFxA"; name = "#identityfxa";
chatnet = "mozilla";
}
}
= Miscellany =