Hmm, this could be easily achieved with a normal bundle command. This command would simply save the current doc "foo.c" as "foo.c.1". If you invoke it again then "foo.c.2" etc. If you want to revert write another command which lets you choose a state of your doc. Furthermore a diff could also be applied quite easily. Saying thus I think there's no need to code something inside of TM.
Regards, --Hans