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

92 commits

Author SHA1 Message Date
efflamlemaillet 6dbd9c68f0
Fix hg: "parse error at 0: not a prefix:" (#12373)
Use two hypen argument `--rev=` instead of `-r=`

Co-authored-by: Efflam Lemaillet <elemaillet@logilab.fr>
Co-authored-by: Pradyun Gedam <pradyunsg@gmail.com>
2023-10-27 11:08:17 +02:00
Pradyun Gedam 389cb799d0
Use -r=... instead of -r ... for hg
This ensures that the resulting revision can not be misinterpreted as an
option.
2023-10-01 14:45:29 +01:00
Stéphane Bidoul 3b4738cf9a Fix git version parsing issue 2023-09-17 20:06:35 +02:00
Christian Clauss 69a1e956da Ruff rules C4,C90,PERF 2023-08-28 14:51:13 +02:00
Stéphane Bidoul 45468f06d4 Pass revisions options explicitly to mercurial commands 2023-07-01 13:41:34 +02:00
Tzu-ping Chung 42359a9605 Migrate tests to use pathlib.Path
The pip-specific Path implementation has been removed, and all its
usages replaced by pathlib.Path. The tmpdir and tmpdir_factory fixtures
are also removed, and all usages are replaced by tmp_path and
tmp_path_factory, which use pathlib.Path.

The pip() function now also accepts pathlib.Path so we don't need to put
str() everywhere. Path arguments are coerced with os.fspath() into str.
2022-06-08 19:58:46 +08:00
James Gerity 5c24a798b8
Change VCS tooling verbosity along with pip's verbosity (#9639)
Co-authored-by: Tzu-ping Chung <uranusjr@gmail.com>
Co-authored-by: Pradyun Gedam <pradyunsg@users.noreply.github.com>
2022-01-25 08:54:02 +00:00
Jon Dufresne 60c274be2d Complete type annotations of tests/unit/ directory 2021-09-23 05:44:54 -07:00
Jon Dufresne a775351a38 Clean up leftover references to removed Travis and Azure CI 2021-08-28 20:01:58 -07:00
Pradyun Gedam 94999255d5
Reformat the codebase, with black 2021-08-20 13:37:49 +01:00
Tzu-ping Chung 72e38ca3df Re-implement Git version parsing with regex
After packaging drops LegacyVersion, version.parse() will no longer
guarantee to be able to parse Git versions, so we need to invent our own
parser. Since we really only care about the major and minor segments,
the logic is pretty simple.
2021-07-02 19:03:15 +08:00
bwoodsend 8b8fa2bd5f Explicitly recognise SCP-shorthand git remotes. 2021-06-03 17:52:25 +01:00
bwoodsend f533671b0c Fix pip freeze to use modern format for git repos (#9822)
Pip dropped support for `git+ssh@` style requirements (see #7554)
in favour of `git+ssh://` but didn't propagate the change to
 `pip freeze` which resultantly returns invalid requirements.
Fix this behaviour.

Fixes #9625.
2021-06-03 17:45:56 +01:00
Stéphane Bidoul ecdcfeb8d6 Remove now unused VCS export code 2021-04-03 15:44:00 +02:00
Laurent LAPORTE 38160547f9 run_command() raises BadCommand if the user don't have permission to run the VCS command. 2021-03-24 20:26:17 +01:00
Andrey Bienkowski 50db373adb Lint 2021-02-10 13:38:21 +03:00
Andrey Bienkowski ab35018c04 Use unittest.mock instead of mock 2021-02-10 13:28:55 +03:00
Anthony Sottile 336e979894 delete some dead test code (VERBOSE_FALSE)
was just browsing through some files and noticed this
2020-10-12 16:05:05 -07:00
Stéphane Bidoul 5797a080b6
Fix test that now requires a working git repo 2020-08-30 11:52:06 +02:00
Tzu-ping Chung ea47920767 Add test case for SlikSVN version parsing 2020-08-01 02:03:45 +08:00
Devesh Kumar Singh 0d2ca67729 Changed ValueError to InstallationError 2020-03-30 22:29:40 +05:30
Devesh Kumar Singh 106bd0d77f Raise an exception if revision is empty in git url 2020-03-29 12:04:48 +05:30
Harsh Vardhan 0e6ac42c93 Add need_svn decorator for tests which require svn
Signed-off-by: Harsh Vardhan <harsh59v@gmail.com>
2019-10-15 17:22:16 +05:30
Pradyun Gedam a0a55bc797
Fix tests when running in git linked worktree
Merge pull request #6846 from chrahunt/bugfix/fix-tests-in-linked-worktree
2019-09-07 13:04:55 +05:30
Chris Jerdonek 7783c47131
Hide security-sensitive strings in VCS command log messages (#6890) 2019-08-21 03:22:57 -07:00
Chris Hunt 2571398f4d Fix tests when running in git linked worktree. 2019-08-07 22:59:10 -04:00
A_Rog 8e26b833d0 Parameterize test_looks_like_hash() (#6650) 2019-07-05 22:31:28 +05:30
Chris Jerdonek 36430e2a43
Merge pull request #6639 from sbidoul/imp_looks_like_hash-sbi
Be stricter in identiying git commit hashes
2019-06-23 08:49:11 -07:00
Stéphane Bidoul (ACSONE) 28fa08688c Be stricter in identiying git commit hashes 2019-06-23 12:00:57 +02:00
johnthagen 3407ccdeb6 Move Subversion arg unit tests from functional folder to unit test folder 2019-06-15 08:04:03 -04:00
Chris Jerdonek 5c89643d3d Remove importing from vcs in pip/_internal/__init__.py.
This also renames the current vcs/__init__.py to vcs/versioncontrol.py.
2019-06-03 01:18:36 -07:00
johnthagen a83a78ef4d Add Subversion interactive support. 2019-05-18 13:34:45 -07:00
johnthagen c8e9caa8a7 Add Subversion.get_vcs_version method (#6390)
Add Subversion.get_vcs_version method to return the version of the currently installed Subversion client.
2019-04-17 00:34:19 -07:00
Chris Jerdonek 977d3f6f8c Make is_commit_id_equal() a class method. 2019-03-22 00:04:55 -07:00
Chris Jerdonek 31d6a4f975 Make resolve_revision() a class method. 2019-03-22 00:04:55 -07:00
Chris Jerdonek 4c5d712057 Change RevOptions to accept a VersionControl subclass. 2019-03-16 01:46:32 -07:00
Chris Jerdonek e1e94530ad Make VersionControl.make_rev_args() a class method. 2019-03-16 01:15:48 -07:00
Chris Jerdonek 3ba489864b Make VersionControl.get_url_rev_and_auth() a class method. 2019-03-16 01:13:25 -07:00
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