1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
Commit graph

54 commits

Author SHA1 Message Date
Chris Jerdonek 67b384b8c7 Make VersionControl.get_netloc_and_auth() a class method. 2019-03-16 01:04:44 -07:00
Chris Jerdonek 632896d70b Move make_vcs_requirement_url() to vcs/__init__.py. 2019-03-01 11:06:24 -08:00
Chris Jerdonek fdbfde03e1 Implement get_src_requirement() in the VersionControl base class. 2019-03-01 11:01:25 -08:00
Chris Jerdonek 6a882b6d91 Fix tests. 2019-01-09 01:52:24 -08:00
Chris Jerdonek 2dbd34724a Test Git.get_remote_url(). 2018-11-10 01:35:22 -08:00
Chris Jerdonek 07900ed732 Change VersionControl.get_src_requirement() to accept the project name. 2018-11-08 04:24:05 -08:00
Chris Jerdonek b087f261fb Add failing tests. 2018-10-29 22:12:47 -07:00
Pradyun Gedam 392cb09b50
Merge pull request #5723 from cjerdonek/vcs-add-git-get-branch
Fix the "new install" case of issue #2037
2018-09-18 19:59:59 +05:30
Pradyun Gedam 2b3609a37d
Merge pull request #5664 from cjerdonek/issue-5375-svn-ssh-auth
Fix #5375: add editable install support for svn+ssh URLs with a username
2018-08-22 08:33:08 +05:30
Chris Jerdonek b11bf9e978 Change get_revision_sha() to return is_branch. 2018-08-21 04:00:35 -07:00
Pradyun Gedam 7ab40252e6
Merge pull request #5623 from cjerdonek/vcs-fix-install-git-ref
Fix #5624: installing a Git ref for installs other than the first
2018-08-17 09:20:48 +05:30
Chris Jerdonek d5af777d0d Fix issue #5624: installing a Git ref for installs after the first. 2018-08-08 00:16:57 -07:00
Chris Jerdonek 8d0423fcbb Simplify test_bazaar__get_url_rev_and_auth(). 2018-08-07 09:06:30 -07:00
Chris Jerdonek f115d1fa2d Combine tests/functional/test_install_vcs_git.py with other test modules. 2018-08-02 13:16:23 -07:00
Chris Jerdonek e1d60f850b Fix #5375: add editable install support for svn+ssh URLs with a username. 2018-07-29 01:08:15 -07:00
Chris Jerdonek 58b21d18dc Add split_auth_from_netloc() to misc.py. 2018-07-25 10:35:50 -07:00
Chris Jerdonek 1a9128dcfc Fix the "+" check in VersionControl.get_url_rev_and_auth() (#5651)
* Add tests, including a failing test.

* Fix "+" check in VersionControl.get_url_rev_and_auth().

* Change AssertionError to ValueError.

This addresses a review comment by @pradyunsg and @xavfernandez.

* Use "!r" inside the format string.

This incorporates a suggestion by @barneygale.
2018-07-25 09:42:13 +02:00
Chris Jerdonek a1e3275287 Remove the unused VersionControl.translate_egg_surname(). 2018-07-22 11:42:17 -07:00
Chris Jerdonek c6e65a0e40 Rename methods to get_netloc_and_auth() and get_url_rev_and_auth().
This addresses review comments by @xavfernandez.
2018-07-19 09:13:05 -07:00
Chris Jerdonek e37a17cc09 Change VersionControl to parse the URL only once to start. 2018-07-15 15:03:06 -07:00
Chris Jerdonek 1f6e1e51ec Make get_url_rev() accept an url argument. 2018-07-11 00:51:38 -07:00
Chris Jerdonek 26457497b8 Add failing test. 2018-07-10 23:51:17 -07:00
Chris Jerdonek d096c6b340 Add test_git__get_url_rev_args() to test a non-SVN backend.
This addresses a review comment of @pradyunsg.
2018-07-09 23:08:27 -07:00
Chris Jerdonek 701d010c02 Implement VersionControl.obtain() in the base class. 2018-07-08 22:46:25 -07:00
DrFeathers bc0d0d3dec Add @pytest.mark.network to a VCS unit test (#5035) 2018-05-30 23:03:13 +05:30
Jeremy Zafran 5bc94f3348 Move remove_auth_from_url and test from Subversion class to pip._internal.utils.misc 2018-04-27 00:41:54 -04:00
Pradyun Gedam 8ed4ac1fe6
Another round of https updates (#4870) 2017-11-21 00:53:22 +05:30
Chris Jerdonek 099fe84752 Fix test after rebasing. 2017-10-05 10:42:04 -07:00
Chris Jerdonek 15d058edf0 Start using Git.get_revision_sha(). 2017-10-05 10:42:04 -07:00
Chris Jerdonek b2d36d2696 DRY up the reference to a sha. 2017-10-05 10:40:55 -07:00
Chris Jerdonek da30b7007d Address @pradyunsg's review comment. 2017-10-05 02:32:54 -07:00
Chris Jerdonek d646aaca72 Choose a better name, and other clean-ups. 2017-10-05 02:32:54 -07:00
Chris Jerdonek d1b9441595 Change check_version() to accept a commit hash / id. 2017-10-05 02:32:54 -07:00
Chris Jerdonek 3e7ce5314f Fix test expectations (the tests now fail). 2017-10-05 02:32:54 -07:00
Chris Jerdonek 4c97794261 Add a failing test case to test_git_check_version(). 2017-10-05 02:32:54 -07:00
Chris Jerdonek c66ecc73ab Address issue #4507: don't warn when installing from a commit hash (#4674)
* Add failing test for issue #4507.

* Add looks_like_hash() with tests.

* Add news file.

* Address issue #4507 by using looks_like_hash().

* Tweak warning text.

* Fix test after rebasing.

* Remove extra line.
2017-10-05 00:16:10 +02:00
Chris Jerdonek 3e56733df4 Add a RevOptions class (#4707)
* Add the RevOptions class, and test.

* Start using the RevOptions class.

* Add news file.

* Update for mypy.

* Fix test after rebasing.

* Address @xavfernandez's review comments.
2017-10-02 00:21:11 +02:00
Donald Stufft 95bcf8c5f6 Move all internal APIs to pip._internal 2017-08-31 14:53:00 -04:00
Pradyun S. Gedam 9923c1ad7e Sort imports and minor Flake8 changes (#4520)
* Run isort on the codebase

Command: isort --recursive --skip __main__.py --skip _vendor -o pip._vendor -sd THIRDPARTY -m 5 -p pip -p tests ./pip ./tests

* 📰
2017-06-13 14:17:00 +02:00
Pradyun S. Gedam 1832569530 Sort all imports 2017-05-16 15:47:47 +05:30
Stéphane Bidoul 4c4df9712a use git fetch --tags
to fetch tags in addition to everything else that
is normally fetched; this is necessary in case a git requirement url
points to a tag or commit that is not on a branch
2016-10-03 18:42:10 +02:00
Jivan Amara 36de76f0a5 Strip authentication from SVN url prior to passing it into svn (#3697) 2016-05-26 06:43:26 -04:00
Stéphane Bidoul b5db433163 remove unused arguments find_tags in vcs.get_src_requirement 2016-01-14 19:04:04 +01:00
Stéphane Bidoul 6f790d1d80 stop the addition of the branch name in the #egg=... fragment 2016-01-14 19:04:02 +01:00
Matt Robenolt 4c3ab41e90 Only update VCS when things have actually changed
This saves a network hop when using git and passing an explicit sha
as a ref by comparing the version that's already checked out.

Yields a ~4x speedup on my local machine

Before:
```
$ /usr/local/bin/pip --version
pip 7.1.0 from /usr/local/lib/python2.7/site-packages (python 2.7)
$ time /usr/local/bin/pip install --disable-pip-version-check -e git+https://github.com/getsentry/raven-python.git@56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e#egg=raven_dev
Obtaining raven-dev from git+https://github.com/getsentry/raven-python.git@56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e#egg=raven_dev
  Updating ./src/raven-dev clone (to 56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e)
  Could not find a tag or branch '56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e', assuming commit.
Installing collected packages: raven-dev
  Running setup.py develop for raven-dev
Successfully installed raven-dev
/usr/local/bin/pip install --disable-pip-version-check -e   0.84s user 0.48s system 39% cpu 3.300 total
```

After:
```
$ /Users/matt/.virtualenvs/pip/bin/pip --version
pip 7.2.0.dev0 from /Users/matt/code/pip (python 2.7)
$ time /Users/matt/.virtualenvs/pip/bin/pip install --disable-pip-version-check -e git+https://github.com/getsentry/raven-python.git@56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e#egg=raven_dev
Obtaining raven-dev from git+https://github.com/getsentry/raven-python.git@56fc6f7beecf445843d0ec7052bb8c6f0ea80a2e#egg=raven_dev
checking version
  Skipping because already up-to-date.
Installing collected packages: raven-dev
  Running setup.py develop for raven-dev
Successfully installed raven-dev
/Users/matt/.virtualenvs/pip/bin/pip install --disable-pip-version-check -e   0.59s user 0.22s system 98% cpu 0.824 total
```
2015-09-01 13:23:18 -07:00
Donald Stufft fca91e1aff Revert "#2414: parse SSH repositories url with a commit hash" 2015-03-16 13:57:41 -04:00
Marc Abramowitz 16a7c81bcf Break long lines to make pep8 happy 2015-03-12 04:04:09 -07:00
Ludovic Gasc (GMLudo) 10f70849fd Add unit tests for Git SSH parsing + remove a bug with explicit SSH URLs 2015-03-11 23:47:01 +01:00
Chris Jerdonek a2090f3172 Change "escape" to "translate" in escape_egg_surname(). 2014-10-01 07:14:47 -04:00
Chris Jerdonek b88207a36f Fix issue #1083.
This commit escapes the egg "surname" when using git with freeze.
2014-10-01 07:14:09 -04:00