If you are tired of downloading and applying patches from trac, wp-apply-patch is for you.

$ wp-apply-patch 13023
Downloading from http://core.trac.wordpress.org/ticket/13023...
Applying 13023.diff...
patching file wp-admin/options-general.php

or in the case of multiple patches in the ticket:

$ wp-apply-patch 13237                                                                                                                                ~/wordpress/trunk:creep M
Downloading from http://core.trac.wordpress.org/ticket/13237...
Choose a patch to apply:
	  0 ā†’ alot.patch by johnjamesjacoby
	  1 ā†’ alot.2.patch by beaulebens
	> 0
Applying alot.patch...
(Stripping trailing CRs from patch.)
patching file wp-admin/import/livejournal.php
…