Has anybody tried implementing (VC) branch specific undo's? It would have to be agnostic to changes both inside Emacs and from the outside when Emacs is running using file-notify-.*
.
One solution would be to associate the end of a file history line with the (sha-xxx) hash of that file.