Commits

Hugo Lopes Tavares committed cbf5cd3

using new `local_repo` style, like local_repo('hg+http://bitbucket.org/ianb/virtualenv';)

Comments (0)

Files changed (5)

tests/test_basic.py

     reset_env()
     result = run_pip('install',
                      '-e',
-                     '%s#egg=initools-dev' %
+                     'svn+%s#egg=initools-dev' %
                      local_repo('svn+http://svn.colorstudy.com/INITools/trunk'))
     result.assert_installed('INITools', with_files=['.svn'])
 
     mkdir('customdl')
     result = run_pip('install',
                      '-e',
-                     '%s#egg=initools-dev' % local_repo('svn+http://svn.colorstudy.com/INITools/trunk'),
+                     'svn+%s#egg=initools-dev' %
+                     local_repo('svn+http://svn.colorstudy.com/INITools/trunk'),
                      '--src',
                      'customsrc',
                      '--download',
 
     result = run_pip('install',
                      '-e',
-                     '%s#egg=initools-dev' % local_repo('svn+http://svn.colorstudy.com/INITools/trunk'),
+                     'svn+%s#egg=initools-dev' %
+                     local_repo('svn+http://svn.colorstudy.com/INITools/trunk'),
                      '--no-install', expect_error=True)
     result.assert_installed('INITools', without_egg_link=True, with_files=['.svn'])
 
     result = run_pip('install',
                      '-e',
-                     '%s#egg=initools-dev' % local_repo('svn+http://svn.colorstudy.com/INITools/trunk'),                     '--no-download', expect_error=True)
+                     'svn+%s#egg=initools-dev' %
+                     local_repo('svn+http://svn.colorstudy.com/INITools/trunk'),
+                     '--no-download', expect_error=True)
     result.assert_installed('INITools', without_files=[curdir, '.svn'])
 
 
     """
     reset_env()
     result = run_pip('install', '-e',
-                     '%s#egg=django-feedutil' % local_repo('git://github.com/jezdez/django-feedutil.git'),
+                     'git+%s#egg=django-feedutil' %
+                     local_repo('git+http://github.com/jezdez/django-feedutil.git'),
                      expect_error=True)
     result.assert_installed('django-feedutil', with_files=['.git'])
 
     """
     reset_env()
     result = run_pip('install', '-e',
-                     '%s#egg=django-registration' %
+                     'hg+%s#egg=django-registration' %
                      local_repo('hg+http://bitbucket.org/ubernostrum/django-registration'),
                      expect_error=True)
     result.assert_installed('django-registration', with_files=['.hg'])
     """
     reset_env()
     result = run_pip('install', '-e',
-                     '%s/#egg=django-registration' %
+                     'hg+%s/#egg=django-registration' %
                      local_repo('hg+http://bitbucket.org/ubernostrum/django-registration'),
                      expect_error=True)
     assert 'pip-log.txt' not in result.files_created, result.files_created['pip-log.txt'].bytes
     """
     reset_env()
     result = run_pip('install', '-e',
-                     '%s/@174#egg=django-wikiapp' %
+                     'bzr+%s/@174#egg=django-wikiapp' %
                      local_repo('bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1'),
                      expect_error=True)
     result.assert_installed('django-wikiapp', with_files=['.bzr'])
     """
     reset_env()
     result = run_pip('install', '-e',
-                     '%s/#egg=django-wikiapp' %
+                     'bzr+%s/#egg=django-wikiapp' %
                      local_repo('bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1'),
                      expect_error=True)
     assert 'pip-log.txt' not in result.files_created, result.files_created['pip-log.txt'].bytes

tests/test_bundle.py

     run_pip('install', '-e', fspkg)
     pkg_lines = textwrap.dedent('''\
             -e %s
-            -e %s#egg=initools-dev
+            -e svn+%s#egg=initools-dev
             pip''' % (fspkg, local_repo('svn+http://svn.colorstudy.com/INITools/trunk')))
     write_file('bundle-req.txt', pkg_lines)
     # Create a bundle in env.scratch_path/ test.pybundle

tests/test_cleanup.py

     env = reset_env()
     run_pip('install',
             '-e',
-            '%s#egg=django-registration' %
+            'hg+%s#egg=django-registration' %
             local_repo('hg+http://bitbucket.org/ubernostrum/django-registration'),
             expect_error=True)
     build = env.venv_path/'build'
     """
     env = reset_env()
     # Install an editable to create a src/ dir.
-    run_pip('install', '-e', 'git://github.com/jezdez/django-feedutil.git#egg=django-feedutil')
+    run_pip('install', '-e',
+            'git+%s#egg=django-feedutil' %
+            local_repo('git+http://github.com/jezdez/django-feedutil.git'))
     build = env.venv_path/"build"
     src = env.venv_path/"src"
     assert not exists(build), "build/ dir still exists: %s" % build
     fspkg = 'file://%s/FSPkg' %join(here, 'packages')
     pkg_lines = textwrap.dedent('''\
             -e %s
-            -e %s#egg=initools-dev
+            -e svn+%s#egg=initools-dev
             pip''' % (fspkg, local_repo('svn+http://svn.colorstudy.com/INITools/trunk')))
     write_file('bundle-req.txt', pkg_lines)
     run_pip('bundle', '-r', 'bundle-req.txt', 'test.pybundle')

tests/test_freeze.py

 
     # Bah, that's no good!  Let's give it a hint::
     result = run_pip('freeze', '-f',
-                     '%s#egg=INITools-dev' %
-                     local_repo('http://svn.colorstudy.com/INITools/trunk'),
+                     'svn+%s#egg=INITools-dev' %
+                     local_repo('svn+http://svn.colorstudy.com/INITools/trunk'),
                      expect_stderr=True)
     expected = textwrap.dedent("""\
-        Script result: ...pip freeze -f %(repo)s#egg=INITools-dev
+        Script result: ...pip freeze -f svn+%(repo)s#egg=INITools-dev
         -- stdout: --------------------
-        -f %(repo)s#egg=INITools-dev
+        -f svn+%(repo)s#egg=INITools-dev
         # Installing as editable to satisfy requirement INITools==...dev-r...:
         -e svn+%(repo)s@...#egg=INITools-...dev_r...
         simplejson==1.7.4...
-        <BLANKLINE>""" % {'repo': local_repo('http://svn.colorstudy.com/INITools/trunk')})
+        <BLANKLINE>""" % {'repo': local_repo('svn+http://svn.colorstudy.com/INITools/trunk')})
     _check_output(result, expected)
 
 
 
     """
     env = reset_env()
-    result = env.run('git', 'clone', local_repo('git://github.com/jezdez/django-pagination.git'), 'django-pagination')
+    result = env.run('git', 'clone', local_repo('git+http://github.com/jezdez/django-pagination.git'), 'django-pagination')
     result = env.run('git', 'checkout', '1df6507872d73ee387eb375428eafbfc253dfcd8',
             cwd=env.scratch_path/'django-pagination', expect_stderr=True)
     result = env.run('python', 'setup.py', 'develop',
         Script result: ...pip freeze
         -- stdout: --------------------
         -e git+%s@...#egg=django_pagination-...
-        ...""" % local_repo('git://github.com/jezdez/django-pagination.git'))
+        ...""" % local_repo('git+http://github.com/jezdez/django-pagination.git'))
     _check_output(result, expected)
 
     result = run_pip('freeze', '-f',
-                     'git+%s#egg=django_pagination' % local_repo('git://github.com/jezdez/django-pagination.git'),
+                     'git+%s#egg=django_pagination' % local_repo('git+http://github.com/jezdez/django-pagination.git'),
                      expect_stderr=True)
     expected = textwrap.dedent("""\
         Script result: pip freeze -f git+%(repo)s#egg=django_pagination
         -- stdout: --------------------
         -f git+%(repo)s#egg=django_pagination
         -e git+%(repo)s@...#egg=django_pagination-...-dev
-        ...""" % {'repo': local_repo('git://github.com/jezdez/django-pagination.git')})
+        ...""" % {'repo': local_repo('git+http://github.com/jezdez/django-pagination.git')})
     _check_output(result, expected)
 
 
     env = get_env()
     result = env.run('hg', 'clone',
                      '-r', 'f8f7eaf275c5',
-                     local_repo('http://bitbucket.org/jezdez/django-dbtemplates'),
+                     local_repo('hg+http://bitbucket.org/jezdez/django-dbtemplates'),
                      'django-dbtemplates')
     result = env.run('python', 'setup.py', 'develop',
             cwd=env.scratch_path/'django-dbtemplates')
         Script result: ...pip freeze
         -- stdout: --------------------
         -e hg+%s@...#egg=django_dbtemplates-...
-        ...""" % local_repo('http://bitbucket.org/jezdez/django-dbtemplates'))
+        ...""" % local_repo('hg+http://bitbucket.org/jezdez/django-dbtemplates'))
     _check_output(result, expected)
 
     result = run_pip('freeze', '-f',
-                     'hg+%s#egg=django_dbtemplates' % local_repo('http://bitbucket.org/jezdez/django-dbtemplates'),
+                     'hg+%s#egg=django_dbtemplates' % local_repo('hg+http://bitbucket.org/jezdez/django-dbtemplates'),
                      expect_stderr=True)
     expected = textwrap.dedent("""\
         Script result: ...pip freeze -f hg+%(repo)s#egg=django_dbtemplates
         -- stdout: --------------------
         -f hg+%(repo)s#egg=django_dbtemplates
         -e hg+%(repo)s@...#egg=django_dbtemplates-...
-        ...""" % {'repo': local_repo('http://bitbucket.org/jezdez/django-dbtemplates')})
+        ...""" % {'repo': local_repo('hg+http://bitbucket.org/jezdez/django-dbtemplates')})
     _check_output(result, expected)
 
 
     reset_env()
     env = get_env()
     result = env.run('bzr', 'checkout', '-r', '174',
-                     local_repo('http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1'),
+                     local_repo('bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1'),
                      'django-wikiapp')
     result = env.run('python', 'setup.py', 'develop',
             cwd=env.scratch_path/'django-wikiapp')
     expected = textwrap.dedent("""\
         Script result: ...pip freeze
         -- stdout: --------------------
-        -e %s@...#egg=django_wikiapp-...
+        -e bzr+%s@...#egg=django_wikiapp-...
         ...""" % local_repo('bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1'))
     _check_output(result, expected)
 
     result = run_pip('freeze', '-f',
-                     '%s/#egg=django-wikiapp' %
+                     'bzr+%s/#egg=django-wikiapp' %
                      local_repo('bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1'),
                      expect_stderr=True)
     expected = textwrap.dedent("""\
-        Script result: ...pip freeze -f %(repo)s/#egg=django-wikiapp
+        Script result: ...pip freeze -f bzr+%(repo)s/#egg=django-wikiapp
         -- stdout: --------------------
-        -f %(repo)s/#egg=django-wikiapp
-        -e %(repo)s@...#egg=django_wikiapp-...
+        -f bzr+%(repo)s/#egg=django-wikiapp
+        -e bzr+%(repo)s@...#egg=django_wikiapp-...
         ...""" % {'repo':
                   local_repo('bzr+http://bazaar.launchpad.net/%7Edjango-wikiapp/django-wikiapp/release-0.1')})
     _check_output(result, expected)

tests/test_pip.py

 import atexit
 import textwrap
 import urllib
+from pip.vcs import subversion, git, bazaar, mercurial
 from scripttest import TestFileEnvironment
 from path import Path, curdir