8
edits
(→Building Sync: Update) |
(Various updates) |
||
Line 56: | Line 56: | ||
= Using Bugzilla = | = 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 | 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 [http://hg.mozilla.org/mozilla-central mozilla-central]. | ||
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. | 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. | ||
Line 77: | Line 75: | ||
= Using Mercurial = | = 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. | 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 == | == Configuration == | ||
Line 120: | Line 118: | ||
== Landing patches == | == Landing patches == | ||
You have items in a patch queue that you'd like to push to | You have items in a patch queue that you'd like to push to m-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 | === Make sure -central is open and green === | ||
Check [https:// | Check [https://treeherder.mozilla.org treeherder]. | ||
=== Make sure your tree is up to date === | === Make sure your tree is up to date === | ||
Line 162: | Line 160: | ||
=== Run tests === | === Run tests === | ||
Now is a great time to run tests, because this is the state in which | Now is a great time to run tests, because this is the state in which mozilla-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 === | === Finish the applied patches === | ||
Line 182: | Line 180: | ||
= Using Git = | = Using Git = | ||
Various projects exist as Git repositories instead of Mercurial repositories. Even when projects are officially hosted in Mercurial, Git mirrors are maintained. | Various projects exist as Git repositories instead of Mercurial repositories. Even when projects are officially hosted in Mercurial, Git mirrors are maintained. The mozilla-central mirror is available at https://github.com/mozilla/gecko-dev, however we recommend that you use https://github.com/glandium/git-cinnabar/wiki/Mozilla:-A-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 use [https://github.com/glandium/git-cinnabar/wiki/Mozilla:-Using-a-git-clone-of-gecko%E2%80%90dev-to-push-to-mercurial this guide] to configure it to push to hg using git-cinnabar. | ||
The | |||
== Configuring Git == | == Configuring Git == | ||
Line 193: | Line 189: | ||
$ git config --global user.name "John Doe" | $ git config --global user.name "John Doe" | ||
$ git config --global user.email "johndoe@mozilla.com" | $ git config --global user.email "johndoe@mozilla.com" | ||
# Enable color output for all commands | # Enable color output for all commands | ||
$ git config --global color.branch auto | $ git config --global color.branch auto | ||
Line 201: | Line 197: | ||
$ git config --global color.status auto | $ git config --global color.status auto | ||
$ git config --global color.ui auto | $ git config --global color.ui auto | ||
# Highlight whitespace | # Highlight whitespace | ||
$ git config --global core.whitespace "trailing-space,space-before-tab,tab-in-indent" | $ git config --global core.whitespace "trailing-space,space-before-tab,tab-in-indent" | ||
# Define your editor for commits, other tools | # Define your editor for commits, other tools | ||
$ git config --global core.editor vim | $ git config --global core.editor vim | ||
If you find you have a slow git prompt, you may find the instructions [https://gist.github.com/thomcc/4c23eeed3b248394bffa0bff04f5c00b here] beneficial as well. | |||
After setting up | |||
= Repositories = | = 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]. | 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]. More information on bundles is available [https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Source_Code/Mercurial/Bundles here]. | ||
[https:// | |||
== mozilla-central == | == mozilla-central == | ||
mozilla-central is the repository for Firefox and the base repository for other Mozilla-based applications. | mozilla-central is the repository for Firefox and the base repository for other Mozilla-based applications. Sync code used to live in a repository named services-central, however currently all client side sync code for Desktop Firefox and Firefox for Android lives in mozilla-central. | ||
== Try server == | == Try server == | ||
To push to try, teave your changes as applied mq patches. Then run: | To push to try, teave your changes as applied mq patches. Then run: | ||
hg push -f ssh://hg.mozilla.org/try/ | 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 = | = Testing = | ||
[https://developer.mozilla.org/en/Writing_xpcshell-based_unit_tests Writing xpcshell-based unit testing]. | [https://developer.mozilla.org/en/Writing_xpcshell-based_unit_tests Writing xpcshell-based unit testing]. Sync tests are located at [https://searchfox.org/mozilla-central/source/services/sync/tests/unit/ /services/sync/tests/unit] | ||
[https://developer.mozilla.org/en-US/docs/Mozilla/Projects/TPS_Tests TPS Tests] | |||
= Collaboration = | = Collaboration = | ||
Line 370: | Line 255: | ||
} | } | ||
{ | { | ||
comment = "Public channel for | comment = "Public channel for FxA"; | ||
name = "# | name = "#fxa"; | ||
chatnet = "mozilla"; | chatnet = "mozilla"; | ||
} | } | ||
} | } | ||
= Miscellany = | = Miscellany = |
edits