So, you wrote some code, and you need to make a ticket.  The first thing to do is get it into your sage library. 

1.  Consider your mercurial queue as a parfait, you need to add a fresh new layer to it, before you start working.  This way, if you do something crazy, you can "pop" it off, and start fresh.  To do this:

../../sage -hq qnew Wednesday

I always call my new layers by the day of the week, it helps to keep things straight.   Doing a qnew will automatically "push" that patch, so when you say

../../sage -hg qapplied

Then, "Wednesday" should be on top.

2.  Now add all of your new stuff into the sage library.  As you add new things, save your work, and then

../../sage -hg qrefresh

will add it to your mercurial tip.  Now to get sage to recognize it, rebuild your library

../../sage -b

If there are major problems with your code, then this won't work.   So, this is a good place to check your code.  

3.  If you are satisfied, then you can export the patch, and send it to your home directory

../../sage -hg export tip > ~/wednesday.patch

Now it should be in your home directory, make sure it's there.  

4.  Now you need to make a new Trac ticket, and put the patch up there.  You should rename the patch before uploading it.  If you ticket is #13031, then the convention is 

Trac_13031.patch 

This part is pretty self-explanatory.