Skip to content
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

Add Subversion.get_vcs_version method #6390

Merged
merged 29 commits into from
Apr 17, 2019
Merged

Add Subversion.get_vcs_version method #6390

merged 29 commits into from
Apr 17, 2019

Conversation

johnthagen
Copy link
Contributor

Relates to #6386

cc @cjerdonek

Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

In addition to my review comments, can you also follow the pattern in the following PR and add a test_ensure_svn_available() test that runs only on Travis? #6139

That way we can be sure that your test that requires svn to be installed will be running in at least one test environment in CI.

news/6390.feature Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
tests/unit/test_vcs.py Outdated Show resolved Hide resolved
@cjerdonek cjerdonek added C: vcs pip's interaction with version control systems like git, svn and bzr skip news Does not need a NEWS file entry (eg: trivial changes) labels Apr 13, 2019
@johnthagen
Copy link
Contributor Author

@cjerdonek Just an FYI, I agree with all of your formatting suggestions. I tried to keep this function consistent with the one for Git (where most of these issues are present currently):

def get_git_version(self):
VERSION_PFX = 'git version '
version = self.run_command(['version'], show_stdout=False)
if version.startswith(VERSION_PFX):
version = version[len(VERSION_PFX):].split()[0]
else:
version = ''
# get first 3 positions of the git version because
# on windows it is x.y.z.windows.t, and this parses as
# LegacyVersion which always smaller than a Version.
version = '.'.join(version.split('.')[:3])
return parse_version(version)

@cjerdonek
Copy link
Member

I tried to keep this function consistent with the one for Git (where most of these issues are present currently)

Yeah, I noticed that. The Git one can be fixed up later to be more in line with this one.

@johnthagen
Copy link
Contributor Author

@cjerdonek I think I've addressed all of your feedback. Thanks for the detailed responses.

Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks -- looking good! A few more comments.

src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
tests/lib/__init__.py Outdated Show resolved Hide resolved
tests/unit/test_vcs.py Show resolved Hide resolved
tests/unit/test_vcs.py Outdated Show resolved Hide resolved
tests/unit/test_vcs.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! A few more (final?) comments.

src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Show resolved Hide resolved
src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
tests/unit/test_vcs.py Outdated Show resolved Hide resolved
tests/unit/test_vcs.py Outdated Show resolved Hide resolved
Copy link
Member

@cjerdonek cjerdonek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few more tiny things..

src/pip/_internal/vcs/subversion.py Outdated Show resolved Hide resolved
tests/unit/test_vcs.py Show resolved Hide resolved
tests/unit/test_vcs.py Show resolved Hide resolved
@cjerdonek cjerdonek merged commit c8e9caa into pypa:master Apr 17, 2019
@cjerdonek
Copy link
Member

Thank you, @johnthagen! 💯

@johnthagen
Copy link
Contributor Author

Thanks for the mentoring @cjerdonek!

@johnthagen johnthagen deleted the svn-version branch April 17, 2019 11:08
@lock
Copy link

lock bot commented May 28, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the auto-locked Outdated issues that have been locked by automation label May 28, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 28, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation C: vcs pip's interaction with version control systems like git, svn and bzr skip news Does not need a NEWS file entry (eg: trivial changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants