macosx: fixing macOS version generation after db9d1dd01bf0
authorRodrigo Damazio <rdamazio@google.com>
Wed, 18 Jul 2018 18:36:39 -0700
changeset 38734 25880ddf9a86
parent 38733 c2586a6e5884
child 38735 8891dc15b327
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
contrib/genosxversion.py
--- 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))