parameters: (repo_url, rev, project_name, subdir=None)
return_statement: return req
docstring: 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.
function: def make_vcs_requirement_url(repo_url, rev, project_name, subdir=None):
  
      # type: (str, str, str, Optional[str]) -> str
  
      """
  
      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.
  
      """
  
      egg_project_name = pkg_resources.to_filename(project_name)
  
      req = f'{repo_url}@{rev}#egg={egg_project_name}'
  
      if subdir:
  
          req += f'&subdirectory={subdir}'
  
  
  
      return req
function_tokens: def make_vcs_requirement_url ( repo_url , rev , project_name , subdir = None ) : # type: (str, str, str, Optional[str]) -> str egg_project_name = pkg_resources . to_filename ( project_name ) req = f'{repo_url}@{rev}#egg={egg_project_name}' if subdir : req += f'&subdirectory={subdir}' return req