Hg push-to-try

Today I am going to write about how to use hg push-to-try command in Firefox. I was very much familiar with git and became familiar with basics of mercurial while applying for Outreachy.  I can proudly say -Open source taught me Git and now teaching me advance topics of mercurial 🙂  and the fact is I am loving it.


Ok! so First of all, before doing push-to-try you need at least Tier-1 commit access. If you have one you can go to next step. Please read about how to get tier-1 commit level access here and definitely this one.  Once you have Commit access, you can proceed for push-to -try.


Ok, Now I am assuming that you have tier- 1 commit access. So if you have a tree with your changes you should be able to push to try using mach or hg push-to-try.


hg push-to-try <option> “<specify try syntax>”

You probably want to specify try syntax, you can do that from TryChooser.

So how to Obtain syntax from TryChooser?

Go to the above link , it lets you choose with tickboxes and radio buttons what builds you need and what tests you need and it generates a string at the top in the greyed out textbox that you can copy/paste as a commit message for try, So, let’s start from left-hand side i.e Build type, Like in my case I only want optimized builds, not debug builds so I pick “opt only”,   then under platforms, I am only changing linux, so I pick “linux” and “linux64”
and in my case, because I don’t need tests or performance benchmarks So, I am done. And the syntax is:

Computed Syntax:

try: -b o -p linux,linux64 -u none -t none

Computed Command:

mach try -b o -p linux,linux64 -u none -t none

So, According to the Computed syntax my push-to-try command in the terminal should be like this:

 hg push-to-try  -m “try: -b o -t none -p linux,linux64 -u none -t none “

A treeherder helps reviewer in many ways. Reviewer directly runs the build from your treeherder-ah, it saves the time(nothing better then this needed 😛 ). So just commit your changes, push it to the review board and  push-to-try 🙂



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s