Hugo Lopes Tavares avatar Hugo Lopes Tavares committed 4bd9523

moved all vcs to tests_cache

Comments (0)

Files changed (2)

 WSGIProxy-*.egg/*
 WebOb-*.egg
 Paste-*.egg/*
-tests/vcs_repos/*
 tests/tests_cache/*
 dist/*
 docs/_build/*

tests/local_repos.py

 from pip.vcs import subversion, git, bazaar, mercurial
 from path import Path
 from test_pip import path_to_url, here
+from pypi_server import PyPIProxy
 
 
 def _create_initools_repository():
 
 
 def _create_svn_repository_for_initools():
-    vcs_repos = _get_vcs_folder()
-    if not os.path.exists(os.path.join(vcs_repos, 'INITools')):
+    tests_cache = _get_vcs_folder()
+    if not os.path.exists(os.path.join(tests_cache, 'INITools')):
         _create_initools_repository()
         _dump_initools_repository()
 
 
 def _get_vcs_folder():
-    folder_name = here/'vcs_repos'
+    folder_name = PyPIProxy.CACHE_PATH
     if not os.path.exists(folder_name):
         os.mkdir(folder_name)
     return folder_name
 
 
 def _get_vcs_and_checkout_url(remote_repository):
-    vcs_repos = _get_vcs_folder()
+    tests_cache = _get_vcs_folder()
     vcs_classes = {'svn': subversion.Subversion,
                    'git': git.Git,
                    'bzr': bazaar.Bazaar,
     else:
         repository_name = os.path.basename(remote_repository)
 
-    destination_path = os.path.join(vcs_repos, repository_name)
+    destination_path = os.path.join(tests_cache, repository_name)
     if not os.path.exists(destination_path):
         vcs_class(remote_repository).obtain(destination_path)
-    return '%s+%s' % (vcs, path_to_url('/'.join([vcs_repos, repository_name, branch])))
+    return '%s+%s' % (vcs, path_to_url('/'.join([tests_cache, repository_name, branch])))
 
 
 def local_checkout(remote_repo):
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.