This is an archive of the discontinued Mercurial Phabricator instance.

build: fake PEP440 versions
ClosedPublic

Authored by joerg.sonnenberger on Feb 4 2021, 5:19 PM.

Details

Summary

If the current version is not exactly a tag, use a local version
specifier to fix it up. PEP 440 uses the "+" separator and only allows
alphanumeric and dot, so use dot for further separations.

Old devel build: 5.7+155-a163cc36d06b
New devel build: 5.7+hg155.a163cc36d06b

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

joerg.sonnenberger edited the summary of this revision. (Show Details)Feb 12 2021, 9:22 AM
This revision was not accepted when it landed; it landed in state Needs Review.
This revision was automatically updated to reflect the committed changes.
martinvonz added inline comments.
setup.py
437–439

This patch broke test-check-format.t because these three lines fits on one line. I'll fix it in flight, but please check your setup.

martinvonz added inline comments.Feb 23 2021, 2:00 AM
setup.py
433–439

I don't know what the "hg" string above (line 422) signifies, but should it be here too?

Also, it seems that the code at https://www.mercurial-scm.org/repo/hg/file/866eb4d6bd9f/contrib/packaging/hgpackaging/util.py#l192 needs to be updated. Our Windows build failed because of that, so that's how I noticed. I'll probably send a patch tomorrow.

martinvonz added inline comments.Feb 23 2021, 12:04 PM
setup.py
433–439

Also, were the added .s in before %(latesttagdistance)s here intentional? If so, why?

these tips would be much needed for the viewers. Those who wanted solution of this problem can have a look at bogusbraxtor where some discussions do take place. With its use everybody can improve their skills.