Versioning doesn't have anything to do with this piece of code.
The technique itself is useful for debugging, but not much else.
I'd very rarely use this sort of thing, but in this case I'd say it's OK.
It's also common to include TODO, FIXME, or BUG comments into code. Sure, you can put them into issue tracker, but having them directly in code gives more context.