def make_vcs_requirement_url(repo_url, rev, project_name, subdir=None):
egg_project_name = pkg_resources.to_filename(project_name)<EOL>req = '<STR_LIT>'.format(repo_url, rev, egg_project_name)<EOL>if subdir:<EOL><INDENT>req += '<STR_LIT>'.format(subdir)<EOL><DEDENT>return req<EOL>
Return the URL for a VCS requirement.

Args:
  repo_url: the remote VCS url, with any needed VCS prefix (e.g. "git+").
  project_name: the (unescaped) project name.