Will upgrading to Mavericks break my Macports?
Solution 1:
Macports provides a guide to migration to a new OS.
Basically you need to uninstall all the ports, install a new Macports and Xcode (although only the command line tools are needed for most ports), then reinstall the ports. If you don;t do this then you might well have issues which Macports community can't help you with.
If you put your configurations in new files rather than directly edit files installed by macports these files will not be overwritten. If you directly edited the config files then you will need to copy them from a backup after the reinstall.
Note on the upgrade. Xcode does not provide a gcc compiler for OSX 10.9 and Macports is now using the corresponding C++ standard library. This means that any C++ based port could well have problems if you just kept your old Macports and did not go through the migration. I suspect that other code is likely to carry on running but when you upgrade a port or add a new one things will get confused.
Solution 2:
I'm not sure about moving from 10.7 to 10.9 but my usage of MacPorts weren't "disrupted" by an upgrade from 10.8 to 10.9 (Same from 10.7 to 10.8).
Though, I imagine that it might depend on which ports specifically you've got installed.
If you want to be extra, extra safe (which you should), simply use Time Machine before doing the upgrade and if all else fails, simply do a restore to 10.7.