-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Detect all registered VCS and choose inner-most #7593
Merged
Merged
Changes from 10 commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
2d3e8f7
Detect all registered VCS and choose inner-most
uranusjr e078115
Strip the repo root output
uranusjr e5c43ed
Add tests for get_repository_root
uranusjr 284352a
Add test to verify freeze output
uranusjr d301cbe
Add marker to Mercurial test
uranusjr ef65422
News
uranusjr 85654a9
Minor code formatting and logging
uranusjr 62ffc7b
Clarify why the max(key=len) logic works
uranusjr 6e2e74a
Normalize path returned by VCS on return
uranusjr 2dc061d
Normailze case in tests
uranusjr 8b0146b
Use double backtick in comments
uranusjr File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Correctly freeze a VCS editable package when it is nested inside another VCS repository. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import os | ||
|
||
from pip._internal.vcs.mercurial import Mercurial | ||
from tests.lib import _create_test_package, need_mercurial | ||
|
||
|
||
@need_mercurial | ||
def test_get_repository_root(script): | ||
version_pkg_path = _create_test_package(script, vcs="hg") | ||
tests_path = version_pkg_path.joinpath("tests") | ||
tests_path.mkdir() | ||
|
||
root1 = Mercurial.get_repository_root(version_pkg_path) | ||
assert os.path.normcase(root1) == os.path.normcase(version_pkg_path) | ||
|
||
root2 = Mercurial.get_repository_root(version_pkg_path.joinpath("tests")) | ||
assert os.path.normcase(root2) == os.path.normcase(version_pkg_path) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems weird, I'd say
call_subprocess
should not raiseInstallationError
which is too high-level.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is definitely not right, but I’d say this belongs to another (refactoring) PR. Note that the Mercurial implementation already catches
InstallationError
right now.