[Updated] D10061: windows: fix parsing of version number to match format from D9955
martinvonz (Martin von Zweigbergk)
phabricator at mercurial-scm.org
Wed Feb 24 15:54:27 UTC 2021
Closed by commit rHGe3f23814bac7: windows: fix parsing of version number to match format from D9955 (authored by martinvonz).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D10061?vs=25802&id=25810
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D10061/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D10061
AFFECTED FILES
contrib/packaging/hgpackaging/util.py
CHANGE DETAILS
diff --git a/contrib/packaging/hgpackaging/util.py b/contrib/packaging/hgpackaging/util.py
--- a/contrib/packaging/hgpackaging/util.py
+++ b/contrib/packaging/hgpackaging/util.py
@@ -161,10 +161,10 @@
>>> normalize_windows_version("5.3rc1")
'5.3.0.1'
- >>> normalize_windows_version("5.3rc1+2-abcdef")
+ >>> normalize_windows_version("5.3rc1+hg2.abcdef")
'5.3.0.1'
- >>> normalize_windows_version("5.3+2-abcdef")
+ >>> normalize_windows_version("5.3+hg2.abcdef")
'5.3.0.2'
"""
if '+' in version:
@@ -188,8 +188,8 @@
if rc is not None:
versions.append(rc)
elif extra:
- # <commit count>-<hash>+<date>
- versions.append(int(extra.split('-')[0]))
+ # hg<commit count>.<hash>+<date>
+ versions.append(int(extra.split('.')[0][2:]))
return '.'.join('%d' % x for x in versions[0:4])
To: martinvonz, #hg-reviewers
Cc: mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20210224/5d0a0efd/attachment-0002.html>
More information about the Mercurial-patches
mailing list