My method is to copy the current template into one pane of WinMerge, revert, copy the reverted template into the other pane of WinMerge, diff them and work through the differences to work out which changes I need to reapply.
However, many of the templates I try to revert don't seem to revert at all. I get a dialogue box asking my if I want to revert the template, and I click "Revert Template". The button greys out, but after a few seconds it becomes active again. I've checked that it's still asking about the same style, and it is. Eventually, I end up on a "/delete" page (e.g. admin.php?templates/message_user_info.632/delete), with no page content.
I've checked the apache error log, and see:
[Tue Jul 19 21:25:04 2011] [error] [client 188.8.131.52] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/sites/respawned.co.uk/www/xf/library/Zend/Db/Adapter/Abstract.php on line 1046, referer: http://www.respawned.co.uk/forums/admin.php?templates/message_user_info.632/edit
[Tue Jul 19 21:28:09 2011] [error] [client 184.108.40.206] PHP Fatal error: Maximum execution time of 30 seconds exceeded in /home/sites/respawned.co.uk/www/xf/library/XenForo/Template/Compiler.php on line 419, referer: http://www.respawned.co.uk/forums/admin.php?templates/quick_reply.635/edit
Should reverting a template take so long?