wix: always normalize version string stable
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 24 Jan 2020 20:24:29 -0800
branchstable
changeset 44172 2251b6cde170
parent 44171 8d653abed861
child 44173 62111bc5ff87
wix: always normalize version string Before, it was possible to pass in a custom version string which would not be valid in MSI. So we always normalize the version string. While we're here, also print when we normalize the version string, for better visibility. Differential Revision: https://phab.mercurial-scm.org/D8004
contrib/packaging/hgpackaging/wix.py
--- a/contrib/packaging/hgpackaging/wix.py	Fri Jan 24 20:21:53 2020 -0800
+++ b/contrib/packaging/hgpackaging/wix.py	Fri Jan 24 20:24:29 2020 -0800
@@ -411,8 +411,11 @@
         extra_packages_script=extra_packages_script,
     )
 
-    version = version or normalize_version(find_version(source_dir))
+    orig_version = version or find_version(source_dir)
+    version = normalize_version(orig_version)
     print('using version string: %s' % version)
+    if version != orig_version:
+        print('(normalized from: %s)' % orig_version)
 
     if post_build_fn:
         post_build_fn(source_dir, hg_build_dir, dist_dir, version)