Yes, there is a way of doing it without having to restore everything, and without any hacks. It will require a restore, but it will be a restore of your iPhone 4 with your iPhone 2G's text messages. (It should work across different phones, I've done it across different software versions on the same phone successfully).
(Note: this assumes you DON'T encrypt your iPhone backups)
First, go to (make sure you have show hidden files and folders turned on):
(if you are on a Mac) ~Library/Application Support/MobileSync/Backup
(if you are on a PC) c:\Documents and Settings\Application Data\Apple Computer\MobileSync\Backup
When you're there, work out which folder is your old iPhone. Then, find the file named
3d0d7e5fb2ce288813306e4d4636395e047a3d28
(the file extension will be either .mddata, .mdbackup or it will have no extension).
If at this point you want to check to ensure that this is the correct phone's SMS file, you can go to
http://insend.de/ and download a copy as a PDF or Excel file to check the contents.
Once you're happy it's the right file, you need to copy it, and paste it into the backup folder of your new iPhone. Then head to iTunes, plug in your iPhone 4 and restore it from backup. All done!
EDIT: Sorry if I didn't make it clear - your iPhone 4 backup will now contain the text messages so restore it from its own backup. You won't lose any of your contacts, apps etc but you gain text messages.
Message was edited by: charlieward