pypa/pip — pull request #717 by lorin (2012-11-04 23:29:58+00:00)
Title: Better check for VCS location

Identify the likely root directory to pass to the vcs.get_backend_name instead of simply using dist.location. This is necessary to support version control systems such as git and mercurial where the VCS metadata directory only exists off of the root directory.

This is a fix for #713, where "pip freeze" outputs the wrong value for a repository checked out from git if the package puts files in the "src" directory.

This change is based on @qwcode's comments at https://github.com/pypa/pip/pull/636#issuecomment-7892540.