Commit Graph

83 Commits

Author SHA1 Message Date
Devesh Kumar Singh ab3ee7191c Remove on_returncode parameter from call_subprocess 2020-05-23 19:13:13 +05:30
Devesh Kumar Singh 94882fd1ed Remove show_stdout from run_command args 2020-05-23 19:13:13 +05:30
Tzu-ping Chung 6e2e74ac29 Normalize path returned by VCS on return 2020-01-15 16:37:05 +08:00
Tzu-ping Chung 85654a9eb8 Minor code formatting and logging 2020-01-14 18:08:00 +08:00
Tzu-ping Chung e0781159c6 Strip the repo root output 2020-01-14 16:40:48 +08:00
Tzu-ping Chung 2d3e8f72e6 Detect all registered VCS and choose inner-most 2020-01-14 00:30:27 +08:00
Stéphane Bidoul (ACSONE) a20395d0db
Be extra safe in caching Git urls
Do not cache in case a branch/tag has the
same name as a commit sha.
2019-11-03 22:54:34 +01:00
Stéphane Bidoul (ACSONE) 9cad519521
Cache wheels built from immutable Git requirements
Cache wheels that are built from Git requirements
that contain an immutable revision (i.e. a sha).
2019-11-03 22:54:33 +01:00
tbeswick f197479dc8 Fixed LF getting converted to CRLF in last commit. 2019-10-11 14:30:30 +13:00
tbeswick f81f3c902c Removed `get_repo_root_dir()`, this functionality is now included in `Git.get_subdirectory()` and `Mercurial.get_subdirectory()`.
Added `find_path_to_setup_from_repo_root()` function to perform the
common parts of `get_subdirectory()`.
2019-10-11 12:27:17 +13:00
tbeswick f7b44a82fe Removed unused import. 2019-10-09 09:45:41 +13:00
tbeswick a0cbe4c440 Fixing bad merge. 2019-10-09 09:11:58 +13:00
TonyBeswick bcbaee7aa5
Merge branch 'master' into master 2019-10-08 18:39:08 +13:00
tbeswick c6906f1a38 - Abstracted out common `get_subdirectory()` code in `Git` and `Mercurial`, adding `get_repo_root_dir()` for the vcs specific code.
- Reverted behaviour of `Git.controls_location()` and `Mercurial.controls_location()` to call the vcs command if the base `VersionControl.controls_location()` doesn't detect the vcs directory.
- Added `log_failed_cmd` argument `VcsSupport.run_command()` to allow vcs commands to be tried without logging errors if they aren't present.
- Corrected indentation.
- Removed `expect_stderr=True` in `test_freeze_mercurial_clone_srcdir` as its not required.
2019-10-08 18:15:22 +13:00
Pradyun Gedam 2eafb0218b
Update all the imports as needed 2019-09-30 11:15:24 +05:30
Maxim Kurnikov 3692097cca add per-file disallow_untyped_defs=False, and set it to True globally 2019-09-29 23:31:15 +02:00
tbeswick b2bae62641 Fixed problem where vcs commands were being called even if they're not installed, causing errors to be logged. 2019-09-25 11:40:38 +12:00
Chris Jerdonek 7783c47131
Hide security-sensitive strings in VCS command log messages (#6890) 2019-08-21 03:22:57 -07:00
Chris Jerdonek 393f626276 Add type annotations to VCS methods passing an url to run_command(). 2019-08-16 16:20:56 -07:00
Pradyun Gedam 537b0fca12
Change isort multi_line_output to 3 2019-07-22 10:15:27 +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
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
Chris Jerdonek 68c105c29d Make VersionControl.fetch_new() an instance method. 2019-05-22 00:11:07 -07:00
Chris Jerdonek 0ea639d644 Remove url as an instance attribute of the VersionControl class. 2019-05-06 22:59:18 -04:00
Chris Jerdonek 4cf8f4240a Refactor away Git.__init__(). 2019-05-06 22:59:18 -04:00
Chris Jerdonek a829362e6a Make fetch_new() a class method. 2019-03-22 00:04:55 -07:00
Chris Jerdonek 36909437f3 Make update_submodules() a class method. 2019-03-22 00:04:55 -07:00
Chris Jerdonek 7a4e8b34da Make get_current_branch() a class method. 2019-03-22 00:04:55 -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 79b64739a9 Make get_revision_sha() a class method. 2019-03-22 00:04:50 -07:00
Chris Jerdonek 22e4be1410 Address review comment: make two methods static. 2019-03-17 00:27:09 -07:00
Chris Jerdonek 12e41eef8b Make VersionControl.get_base_rev_args() a class method. 2019-03-16 01:21:30 -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 7f6edbd252
Merge pull request #6130 from cjerdonek/move-get-src-requirement-to-base-class
Move get_src_requirement() to the VersionControl base class
2019-03-14 15:22:54 -07:00
Pi Delport 5f3c56e188 Fix some typos 2019-03-12 21:54:18 +01:00
Chris Jerdonek fdbfde03e1 Implement get_src_requirement() in the VersionControl base class. 2019-03-01 11:01:25 -08:00
Chris Jerdonek 8d45557ff1 Make get_src_requirement() a class method. 2019-01-09 01:52:24 -08:00
Chris Jerdonek 8a036105dd Make get_revision() and get_revision_hash() class methods. 2019-01-09 01:52:19 -08:00
Chris Jerdonek 8a771d027d Make get_remote_url() a class method. 2019-01-09 01:24:16 -08:00
Chris Jerdonek 41f058b4f5 Make _get_subdirectory(), _get_svn_url_rev(), and _is_local_repository() class methods. 2019-01-09 01:24:16 -08:00
Chris Jerdonek 00ae3f594d Make VersionControl.run_command() a class method. 2019-01-09 01:24:16 -08:00
Chris Jerdonek 526ac40e63 Fix freeze to handle Git repos with no remote. 2018-12-21 01:10:06 -08:00
Chris Jerdonek 929c95833d Address review comments. 2018-12-20 17:39:08 -08:00
Chris Jerdonek 1e903eab5a Improve branch detection to work if a tag exists with the same name. 2018-12-16 12:00:42 -08:00
Chris Jerdonek cc9f03dea9 Rename get_branch() to get_current_branch(). 2018-12-16 02:08:27 -08:00
Chris Jerdonek 7e8e706791 Rename VersionControl.get_url() to get_remote_url(). 2018-11-09 22:55:59 -08:00
Chris Jerdonek 07900ed732 Change VersionControl.get_src_requirement() to accept the project name. 2018-11-08 04:24:05 -08:00
Tom Forbes 78371cc950 Redact basic authentication passwords from log messages (#5773)
Redact basic authentication passwords from URLs.
2018-10-19 02:06:10 -07:00