Keep your copy of your modified code-base in a source control system. I recommend mercurial.
Drop the original version of the wordpress code that you went on to modify into mercurial and commit it. Then drop your modified codebase over the top of it and commit it while giving it a branch name. Call the branch 'oursite', whatever.
The point is, mercurial now knows how your site differs from the standard distribution. This makes upgrades easier.
When the next version of wordpress comes out, download it and drop it over the top of your local mercurial working directory. Just make sure you 'update' that working copy to the default branch, ie not your 'oursite' branch. Mercurial now knows how the new wordpress version differs from the previous one. Mercurial is very good at merging the differences from two 'child' versions of a common 'parent' and more often than not, your custom tweaks will be incorporated fine.