#150505 Port devel_generate to 6.x. patch by Rok. not perfect, but close enough. see issue for details.