Page MenuHomePhabricator

wix: more robust normalization of RC version components
ClosedPublic

Authored by indygreg on Jan 24 2020, 11:34 PM.

Details

Summary

MSI has strict version requirements where the format is
A.B.C[.D] and all fields must be numeric
(https://docs.microsoft.com/en-us/windows/win32/msi/productversion?redirectedfrom=MSDN).
Only the first 3 are used by the installer itself.

Mercurial's version strings can have rcN and an optional
+<commit>-<date> fragment at the end.

This commit teaches the MSI version normalization to handle
both of these more robustly.

Before, we would throw away the .rcN component completely.
e.g. 5.3rc1 would get normalized to 5.3.0. And worse,
5.3rc0+5-abcdef would get normalized to 5.3.5.

After this commit, presence of an .rcN provides the
value for a 4th field. e.g. 5.3rc1 -> 5.3.0.1. In
addition, the commit count from the + suffix gets
normalized into the 4th version component, but only if
the original version string didn't have a 4th version
component or if no rcN is present. e.g. 5.3+5-abcdef
is 5.3.0.5.

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

indygreg created this revision.Jan 24 2020, 11:34 PM

This series is for stable in case it gets missed in the Phabricator UI.

pulkit accepted this revision.Jan 25 2020, 6:15 PM
This revision is now accepted and ready to land.Jan 25 2020, 6:15 PM
This revision was automatically updated to reflect the committed changes.