-
Notifications
You must be signed in to change notification settings - Fork 3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7593 from uranusjr/hg-under-git
Detect all registered VCS and choose inner-most
- Loading branch information
Showing
7 changed files
with
122 additions
and
31 deletions.
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) |