changeset 44172:2251b6cde170 stable

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
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 24 Jan 2020 20:24:29 -0800
parents 8d653abed861
children 62111bc5ff87
files contrib/packaging/hgpackaging/wix.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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)