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

git and hg: ignore tags that can't be normalized to version numbers #235

Open
avirshup opened this issue Mar 20, 2018 · 1 comment
Open

Comments

@avirshup
Copy link
Contributor

As discussed in #229, when determining the latest tag, it would be ideal to use a general, unambiguous test for whether or not to ignore a given SCM tag.

For instance, a commit marked with tag v2.1.0a4 should, of course, be considered version 2.1.0a4. A commit tagged only with my.awesome.tag should be ignored (and definitely NOT parsed as major='my', minor='awesome', patch='tag').

After dealing with #229, I'll add a more complete spec here for how this test should work. My preference is to delegate to an existing tool that normalizes version strings according to PEP440.

@reece
Copy link
Contributor

reece commented May 14, 2019

I've recently started getting errors like
AssertionError: cant parse version default/1.2.6.dev1
in several repos.

(I believe this tag was generated by hg-git (unconfirmed). In any case, I did make the 1.2.6.dev1 tag, but not with the default/ prefix.)

Regardless of the cause, it seems that setuptools_scm does not deal gracefully with tags that look like version numbers but aren't. Currently, it appears that all tags with a . are deemed to be version tags (in hg.py:get_latest_normalizable_tag()), which is clearly too permissive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants