This is a supplement to the general instructions for obtaining Mozilla source code.
You can look at
tinderboxpushlog Treeherder to see how green the tree is, though often there are known random failures in play so it can be tricky to identify exactly how good the build is. But in general if it isn't burning it should be mostly usable.
On the left hand, you see pushlogs, which means one or more changeset(s) pushed at once. On the right, you see the results of the tinderbox machines associated with that pushlog. Each letter shows a machine status type. Here's a short glossary (tooltips available on hovering the letters):
B - Build
M - Mochitest
R - Reftest
J - JSReftest
T - Talos (performance tests)
S - Static analysis tests
For each pushlog, you can check whether all of the letters associated with it on all platforms are green or not. Having them all green is a sign of a healthy changeset to pull. Some failures might be intermittent (or due to machine issues, etc), which are (hopefully) starred.
You should note that once you find a healthy pushlog changeset ID, you need to pull its topmost changeset.
In case you only care about one platform: "WINNT 5.1" means Windows XP, "WINNT 5.2" means Windows Server 2003, and "WINNT 6.1" means Windows 7. The Mac OS X 10.5 machines test 32-bit; the 10.6 machines test 64-bit.
If for example you see that revision 531f60d6cf88 is good enough, you should do the following locally and start a build:
hg pull hg up 531f60d6cf88