Skip to content

Commit

Permalink
Removed legacy names.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaraco committed Dec 5, 2023
1 parent 5fcc276 commit 47185ac
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 12 deletions.
7 changes: 1 addition & 6 deletions jaraco/vcs/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@
from .subprocess import Mercurial, Git


__all__ = ['Repo', 'repo']
__all__ = ['Repo', 'repo', 'Mercurial', 'Git']

repo = Repo.detect

# for compatibility
RepoManager = Repo
MercurialManager = Mercurial
GitManager = Git
3 changes: 0 additions & 3 deletions jaraco/vcs/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ def detect(location='.'):
e.args = ("No source repo or suitable VCS version found",)
raise

# for compatibility
get_first_valid_manager = detect

@staticmethod
def existing_only(managers):
"""
Expand Down
1 change: 1 addition & 0 deletions newsfragments/+22b83231.removal.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Removed legacy names.
7 changes: 4 additions & 3 deletions tests/test_managers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,10 @@
def test_existing_only():
"""
Test the static method RepoManager.existing_only.
Presumably, '/' is never an hg repo; at least for testing
purposes, that's a reasonable assumption.
"""
# presumably, '/' is never an hg repo - at least for our purposes, that's
# a reasonable assumption.
mgrs = vcs.Repo.get_valid_managers('/')
existing = list(vcs.Repo.existing_only(mgrs))
assert not existing
Expand All @@ -26,5 +27,5 @@ def test_no_valid_managers():
a nice message.
"""
with pytest.raises(StopIteration) as err:
vcs.Repo.get_first_valid_manager()
vcs.Repo.detect()
assert 'no source repo' in str(err).lower()

0 comments on commit 47185ac

Please sign in to comment.