Adventures in resets

Personally, I don’t like to do resets on hg.  Git resets are so much easier.

B2G happens to be a mirror off of so it works off of git.

Unfortunately, gecko devs work off of hg.

So in order to find the same revision you have to either have a mapping or I found an easier way: git log –grep=”Bug 1107139″

or whatever bug you’re looking up.

Both gecko and gaia dev have a work flow that includes the bug number.  This will show you all the revs with that bug number.

You can then do a: git reset –hard d103771dfdee3f8475a10f3de9ff5998ac2d686e

or whatever your hash you want to reset is.

On hg, installing extensions helps out a lot in terms of backout and such…. still got a bit to learn about how hg works.

[edit: If you want to try reset on hg, there’s some reading material… ]

Posted in Uncategorized | Leave a comment

Backouts for gecko / gaia

from : 
To enable this extension, create an entry for it in your hgrc, like this:

qbackout = ~/mozilla/qbackout

For more information, see

and then see :
Posted in Uncategorized | Leave a comment

hg and patches

Repost from Sid’s post;

  1. Download the .patch or .diff file onto your machine
  2. Navigate to the repo that you want to install the patch to i.e. testRepo (I will using repo name for this example, substitute it with your repo name when you are trying to apply a patch yourself)
  3. Open testRepo.hghgrc (the config file)
  4. Add the following to hgrc and save (This enables queues for hg so that we can use commands that we need, qimport and qpush)[extensions] =
  5. Now open up a command prompt and navigate to your repo directory
  6. Type in hg qimport <full-path-of-patch-file> and press enter
  7. The above command should create a patch folder within testRepo.hgpatches
  8. Next navigate to  testRepo.hgpatches
  9. Type in hg qpush <patch-file-name>
  10. Done! The patch should have been applied (if you get an error such as “abort: local changes found, refresh first” then that means you have made changes to the original files and the patch won’t work)

I normally do :  hg patch –no-commit -p0 patchfile

This is a different way of doing patches using hg and hg queues.

Posted in Uncategorized | Leave a comment

MacOS Desktop Build for Firefox OS

Martijn and I figured out that the profile directory had moved on the Mac OS Desktop Build recently.

One way to fix it so that the Desktop build runs is that you can create a shortcut link to the profile from where it used to be.

cd /Users/nhirata/Desktop/

ln -s ../Resources/gaia gaia

We’re not sure why this changed recently, bug 1142605 is tracking this issue.

Posted in Uncategorized | Leave a comment

More build stuff:

Looks like we do support distcc compilation, not sure how it works with B2G; I'll play with that on my own time.

To speed things up though, I did mess with the j option for make and ac_add_options –disable-tests ; I kept the symbols in the event that I crash and need to try taking a look at the crash.

Also to note, I think it’s been patched so you can’t just short cut link the gecko any more for the ./repo sync… ./repo sync will overwrite what you have if you have a short link.  The proper way would probably be to override the variables.   See :

I’ll have to mess with that when I have more time.

[UPDATE:  Dave Huseby already blogged about it and has a working .userconfig ]

Old notes on compiler options :

Posted in Uncategorized | Leave a comment

Gaia Build variables

Yay: found some build variables and options that I can run to help me test.

Posted in Uncategorized | Leave a comment

Something else I learned:

There’s some things that could be done in order to speed up the build time.

Changing the make -j<value> could help in regards to speeding up builds.  I’ve seen different posts in regards to whether the value is related to CPU/Cores or memory.

I decided to ultimately try this :

I set my configuration file : .config in the B2G to J10.

It did seem to make a difference.

There’s some other interesting options listed here :

What would be interesting also, is to use some farm nodes to build using :


Posted in Uncategorized | Leave a comment