Getting Access to and Using the Mozilla Try Server

There are obviously some guidelines available on the Mozilla Developer Network to help with all of this already, but I figure I’ll help with a nice abridged version that will cut through the fat to get at the meat and bones.

First things first. You will need a Mozilla hg account

  1. File a bug in the Repository Account Requests component. Okay okay, TECHNICALLY you are supposed to read the Commit Access Policy. It talks about the reasoning behind why they chose this kind of system and what each level entails. And since I doubt anyone reading this post needs above level 1 access (probably can’t skip levels too I guess) there isn’t much of a need.
  2. Fill out the ticket. This includes an appropriate bug title/name (E.G. Commit Access Level 1 for FirstName LastName). You will also need to include your public ssh key attached as a plain text file. Since I’m guessing you, the reader, use git then good! You can just use that very same one. Copy it to somewhere more accessible than you ~/.ssh directory and attach it to the bug. Finally, add the email you want to use as your account name.
  3. Next you need to send in a completed Committer’s Agreement. You have a couple of options here. You can print out the PDF and physically mail it to them (How old fashioned….), send them an email using the plain text versions in that link (Must be a S/MIME-signed email. I have no clue what that means so don’t ask), OR, like I chose, print the PDF fill it out and scan it onto a machine and then attach that to them in an email.
  4. If you followed the steps properly you will be notified when you have gained an account along with appropriate information. If something went wrong, you will get notified as well.

Now on to pushing patches!
Yeah, now your forced to use hg/Mercurial. I know it sucks. Thankfully you can avoid it in all other aspects and this part isn’t too painful.

  1. Obviously you will need this installed in some fashion. Mercurial can be downloaded here.
  2. You will need to clone mozilla-central to somewhere on your system. Fairly simple:
    hg clone http://hg.mozilla.org/mozilla-central/
    Switch to the mozilla-central directory when you are done.
  3. Like Git you can create custom aliases to make frequently used commands less painful. Create a file called .hgrc in your root (~/) and open it. I borrowed these from Jon Buckley:

    [ui]
    username = FirstName LastName

    [extensions]
    mq =

    [diff]
    git = 1
    showfunc = 1
    unified = 8

    [defaults]
    diff=-U 8 -p
    qdiff=-U 8

    [paths]
    try = ssh://hg.mozilla.org/try

    [alias]
    nuke = strip 'roots(outgoing())'

  4. Next you will want to create a file called try in your repo. In there you will want to add the options that tell the try server what systems/types of builds you want to use. You can figure that out here. However most of the time using the defaults is perfect. Copy the text from the textbox on the page and place it in the try file you made. hg add that file and then hg commit -m “Some message, best to use the options you put in the file”.
  5. You will need to add the mozilla try server to a hosts config at your .ssh directory. Chances are you might not have a config file in that directory already to do touch ~/.ssh/config. Open it now and add this to it:

    Host hg.mozilla.org
    User emailYouRegisteredForYourAccount
  6. Now you will want to ensure your mozilla-central repo is up to date and need to do a pull. hg pull will do.
  7. Now you get to import your patch. Once again this is pretty simple: hg import ~/Path/To/Your/Patch
  8. Use one of your handy dandy little aliases and simply use the following command: hg push -f try
  9. If all goes well you shouldn’t have any problems as I’m fairly certain I included all the steps I missed that gave me problems. After that use another one of our handy aliases that helps return repo back to normal: hg nuke . You should receive an email shortly containing a link to your builds information.

Yay, you can push your patches now to the try server to have all the 600000+ tests run against it on multiple platforms at once! No more doing it yourself (although if you did this before, well, you’re probably insane).

Happy hacking!

Advertisements

2 responses to “Getting Access to and Using the Mozilla Try Server

  1. Immigration Lawyer Brentwood 15/04/2013 at 5:27 pm

    Greetings! Very helpful advice in this particular post! It is the little changes
    which will make the biggest changes. Thanks a lot for sharing!

  2. Work permit employment 01/05/2013 at 9:56 am

    Hi there i am kavin, its my first occasion to commenting anywhere,
    when i read this paragraph i thought i could also make comment due to this brilliant
    post.

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: