This article is in need of a technical review.
This article will be particularly helpful for people who have recently got their L3 commit access. This describes how to land your patch.
The first thing you should do when you're starting is go through the Mozilla-Inbound tree rules. After that:
Obtain Mozilla-Inbound: The most convenient way to land patches is to manage a local mozilla-inbound repository, besides your mozilla-central. I keep my mozilla-central for hacking on my bugs and mozilla-inbound only for pushing patches. One way is to clone the entire repo from Mozilla-Inbound. A second, much easier and faster way is to clone it from your existing local mozilla-central. So just run this in the directory where you want to clone your m-i:
hg clone /path/to/m-c mozilla-inbound
and then run this command inside your newly cloned repository:
hg strip --no-backup 'roots(outgoing())'
Make Mozilla-Inbound push compatible: Edit your .hg/hgrc inside the local m-i to look like below. Some people prefer to name their push url’s to default-push since that enables them to push by simply issuing hg push compared to hg push inbound (which I have to issue to push) according the below configuration. I prefer the latter since typing inbound just makes sure that I am aware of where I am pushing (and just cautions me to be careful). See |hg help urls|.
[paths]default = https://hg.mozilla.org/integration/mozilla-inbound
inbound = ssh://hg.mozilla.org/integration/mozilla-inbound
hg pull -u
hg qimport ../mozilla-central/.hg/patches-name_of_queue_to_import/name_of_patch
r=patch-reviewer-username) by running
hg qrefresh -e
hg qfinish -a
hg push inbound
hg qimport -r tip
If Something Goes Wrong
- Join the #developers or #introduction on irc.mozilla.org and ask someone for help.
- If you know what caused this problem, then simply back out your push. You can also use this nice backout extension by Steve Fink for mercurial by doing the following:
- Download the __init__.py from the repository. Save it in a convenient location.
- Go to your hgrc (in my case /etc/mercurial/hgrc), and add this to it under the section called [extensions]: qbackout = /path/to/qbackout . Save it and close it.
- Run hg qbackout -r revnum from your local mozilla-inbound repository. This will create a mercurial queue out of that revision which you backed out. Now you need to push this onto inbound, similar to what you did previously.
- Qbackout would have created an mq; pop that queue and run hg pull -u in your local mozilla-inbound.
- hg qpush —move name_of_backout_mq
- hg qfinish -a
- hg push inbound
- When successfully pushed, this will spit out a url; paste that url in the concerned bug in bugzilla so that others also know about it.
- If the above fails, repeat the process again.