Mobile/Fennec/Android/Suggested workflow: Difference between revisions
No edit summary |
|||
Line 8: | Line 8: | ||
Mercurial (hg) is the the main version control system that Mozilla uses, and to submit code for review, you should be able to generate patches or commits. Be sure to run <tt>mach mercurial-setup</tt> when cloning the source code repository -- this will ensure you have good default settings and extensions. | Mercurial (hg) is the the main version control system that Mozilla uses, and to submit code for review, you should be able to generate patches or commits. Be sure to run <tt>mach mercurial-setup</tt> when cloning the source code repository -- this will ensure you have good default settings and extensions. | ||
Instructions for submitting a patch can be found [https://developer.mozilla.org/en-US/docs/ | Instructions for submitting a patch can be found [https://developer.mozilla.org/en-US/docs/Mercurial/Using_Mercurial#How_can_I_generate_a_patch_for_somebody_else_to_check-in_for_me.3F here]. You can also use [http://mozilla-version-control-tools.readthedocs.org/en/latest/mozreview/commits.html MozReview] which is our more modern way of creating and managing review requests. | ||
After writing the patch, make sure the commit message is of the correct format:<br /> | After writing the patch, make sure the commit message is of the correct format:<br /> |
Revision as of 22:54, 8 April 2016
Once you've got a build set-up, you can start contributing code.
If you're a new contributor, you can pick a "good first bug" here, or jump into #mobile to ask.
These common Tips and How-To's will help you get started.
Creating commits and submitting patches
Mercurial (hg) is the the main version control system that Mozilla uses, and to submit code for review, you should be able to generate patches or commits. Be sure to run mach mercurial-setup when cloning the source code repository -- this will ensure you have good default settings and extensions.
Instructions for submitting a patch can be found here. You can also use MozReview which is our more modern way of creating and managing review requests.
After writing the patch, make sure the commit message is of the correct format:
Bug <bug#> - <bug title>. r=<reviewer>
So for example, for bug 1128431, the commit message should be:
Bug 1128431 - 'Start browsing' link from onboarding v1.5 is not visible on small screen devices. r=liuche
Mercurial
Historically, Mozilla has used Mercurial patch queues to submit code changes for review. However, Mozilla developers are now encouraged to use a Mercurial bookmark-based workflow.
If you're a contributor and new to Mercurial, patch queues are conceptually simple and fine for getting your first few patches up; see the instructions on Mercurial patch queues.
If you're interested in using bookmarks, take a look at bookmarks-based development.
(If you want more information about bookmarks-based workflow, take a look at gps's slides; gps's blog is another good place to get information about version control at Mozilla.)
For more information about configuring your hg environment to work well at Mozilla, see Mercurial for Mozillians. Also, if you're curious to see an active hgrc with potentially useful aliases (and thus commonly used commands), check here.
Additional topics
For information on how to run and write tests, see the Testing page.
For more specialized topics, see these Advanced Topics. You can find information about advanced debugging, modifying build flags, etc.