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

subversion revision tagging fails in setuptools 3.4.3 with subversion 1.8.x (patch) #185

Closed
ghost opened this issue Apr 10, 2014 · 5 comments

Comments

@ghost
Copy link

ghost commented Apr 10, 2014

Originally reported by: cazabon (Bitbucket: cazabon, GitHub: Unknown)


https://mail.python.org/pipermail/distutils-sig/2014-April/024135.html

In a Python 2.7.6 virtualenv with setuptools 3.4.3 installed, setuptools fails to extract the svn revision from a package in an svn working copy checkout under these conditions:

  • subversion 1.8.x
  • python package is in a subdirectory of the working copy checkout, so there is no .svn dir in the package's dir due to subversion keeping it all in a single place in the root of the working copy

This appears to be due to this test failing, in egg_info.py's tags():

    if self.tag_svn_revision and (
        os.path.exists('.svn') or os.path.exists('PKG-INFO')
    ):

I'll attach a patch which fixes the problem for me -- basically calling get_svn_revision() whenever tag_svn_revision is set, and using the result if it's not 0.


@ghost
Copy link
Author

ghost commented Apr 12, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


I hope Philip can review this patch.

@ghost
Copy link
Author

ghost commented Apr 12, 2014

Original comment by philip_thiem (Bitbucket: philip_thiem, GitHub: Unknown):


Yeah this looks like a hold over from the old 1.6 and earlier only code. I would expect tagging to fail also with 1.7.x. I think the patch is fine. +1

There will be a warning whenever svn is not installed, but since it needs "--tag-svn-revision" which clearly svn related, I don't think we have to worry about breaking non-svn unittest setups when the command isn't present.

After a quick grep, I am thinking we might want to do a tag-svn-revision regression test. I can do that and run it on svn 1.3-1.8 before pushing out to travis.

@ghost
Copy link
Author

ghost commented May 31, 2014

Original comment by philip_thiem (Bitbucket: philip_thiem, GitHub: Unknown):


Pending pull request #57

@ghost
Copy link
Author

ghost commented Jun 29, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


Fixes Issue #185: Svn not working on new style svn metadata.

@ghost
Copy link
Author

ghost commented Jun 29, 2014

Original comment by jaraco (Bitbucket: jaraco, GitHub: jaraco):


This is going out as 5.3.

@ghost ghost added minor bug labels Mar 29, 2016
@ghost ghost closed this as completed Mar 29, 2016
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants