In creating my first Firefox patch I struggled a bit to put everything together.
These are the steps I followed:

1. Configure mercurial

Add this settings to ~/.hgrc

 username = Diogo Golovanevsky Monteiro   
 ui.merge = meld

 git = 1  
 showfunc = 1  
 unified = 8

 diff = -p -U 8  
 qdiff = -p -U 8  
 qnew = -U  
 commit = -v

 mq =  

2. Clone Mozilla’s repo

hg clone src

3. Make changes to the code

4. Create a new patch

hg qnew -f bug-1234

5. Make sure you are in the right patch

hg qtop

6. Enter a commit message to the patch

hg qrefresh -m "Bug 1234 – bug description"

7. Make sure the patch applies cleanly

hg qpop -a
hg pull
hg update
hg qpush

The patch will be saved in /repoRoot/.hg/patches/patchName

For a more detail explanation:
Getting Mozilla Source Code Using Mercurial
How to Submit a Patch
Creating a patch
Using Mercurial
Mercurial Queues