From d32e696f3a638033ca2f59389feb322049e4f979 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 18 Nov 2013 10:18:30 -0800 Subject: [PATCH] Fix versioning script on Python 3. --- support/buildbot/Versioning | 3 +++ support/buildbot/generate_headers.py | 2 ++ 2 files changed, 5 insertions(+) diff --git a/support/buildbot/Versioning b/support/buildbot/Versioning index 0e0d9a2..5d14a2c 100644 --- a/support/buildbot/Versioning +++ b/support/buildbot/Versioning @@ -20,6 +20,9 @@ sources = [ # This is a hack, but we need some way to only run this script when HG changes. os.path.join(builder.sourcePath, '.hg', 'dirstate'), + + # The script source is a dependency, of course... + argv[1] ] cmd_node, output_nodes = builder.AddCommand( inputs=sources, diff --git a/support/buildbot/generate_headers.py b/support/buildbot/generate_headers.py index 2763b53..914e351 100644 --- a/support/buildbot/generate_headers.py +++ b/support/buildbot/generate_headers.py @@ -14,6 +14,8 @@ OutputFolder = os.path.normpath(argv[1]) def get_hg_version(): argv = ['hg', 'parent', '-R', SourceFolder] text = subprocess.check_output(argv) + if str != bytes: + text = str(text, 'utf-8') m = re.match('changeset:\s+(\d+):(.+)', text) if m == None: raise Exception('Could not determine repository version')