the traditional method I've seen outlined in "fix it yourself" type manuals would be to use a piece of masking tape to mark each plug and where it went as you unplug it, and then make sure the plug you put in from the new supply is the same.
Although for the most part, nowadays you'd have to try really hard to plug anything in wrong.