macosx: fixing macOS version generation after
db9d1dd01bf0
With the Python3 change, the string is now something like
version = b'4.6.2+848-
88be288e8ac1'
where it was previously just:
version = '4.6.2+848-
88be288e8ac1'
Differential Revision: https://phab.mercurial-scm.org/D3964
--- a/contrib/genosxversion.py Tue Jul 10 17:01:06 2018 +0530
+++ b/contrib/genosxversion.py Wed Jul 18 18:36:39 2018 -0700
@@ -117,9 +117,9 @@
return
with open(opts.versionfile) as f:
for l in f:
- if l.startswith('version = '):
+ if l.startswith('version = b'):
# version number is entire line minus the quotes
- ver = l[len('version = ') + 1:-2]
+ ver = l[len('version = b') + 1:-2]
break
if opts.paranoid:
print(paranoidver(ver))