handle REPO_NEW in repo_write