Improved revision id generation