Commit 5cf595c7 authored by Hans Wennborg's avatar Hans Wennborg Committed by Commit Bot

Fix regex in Clang's upload_revision.py

CLANG_SVN_REVISION is prefixed with an 'n' these days, e.g. 'n331734'.

Bug: 1015315
Change-Id: I6ed404f230be71f745f7febab10a222f8d6c6cf5
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1939973Reviewed-by: default avatarNico Weber <thakis@chromium.org>
Commit-Queue: Hans Wennborg <hans@chromium.org>
Auto-Submit: Hans Wennborg <hans@chromium.org>
Cr-Commit-Position: refs/heads/master@{#719594}
parent 5e3ce003
...@@ -33,7 +33,7 @@ def PatchRevision(clang_git_revision, clang_svn_revision, clang_sub_revision): ...@@ -33,7 +33,7 @@ def PatchRevision(clang_git_revision, clang_svn_revision, clang_sub_revision):
content = f.read() content = f.read()
m = re.search("CLANG_REVISION = '([0-9a-f]+)'", content) m = re.search("CLANG_REVISION = '([0-9a-f]+)'", content)
clang_old_git_revision = m.group(1) clang_old_git_revision = m.group(1)
m = re.search("CLANG_SVN_REVISION = '([0-9]+)'", content) m = re.search("CLANG_SVN_REVISION = '(n[0-9]+)'", content)
clang_old_svn_revision = m.group(1) clang_old_svn_revision = m.group(1)
m = re.search("CLANG_SUB_REVISION = ([0-9]+)", content) m = re.search("CLANG_SUB_REVISION = ([0-9]+)", content)
clang_old_sub_revision = m.group(1) clang_old_sub_revision = m.group(1)
...@@ -41,7 +41,7 @@ def PatchRevision(clang_git_revision, clang_svn_revision, clang_sub_revision): ...@@ -41,7 +41,7 @@ def PatchRevision(clang_git_revision, clang_svn_revision, clang_sub_revision):
content = re.sub("CLANG_REVISION = '[0-9a-f]+'", content = re.sub("CLANG_REVISION = '[0-9a-f]+'",
"CLANG_REVISION = '{}'".format(clang_git_revision), "CLANG_REVISION = '{}'".format(clang_git_revision),
content, count=1) content, count=1)
content = re.sub("CLANG_SVN_REVISION = '[0-9]+'", content = re.sub("CLANG_SVN_REVISION = 'n[0-9]+'",
"CLANG_SVN_REVISION = '{}'".format(clang_svn_revision), "CLANG_SVN_REVISION = '{}'".format(clang_svn_revision),
content, count=1) content, count=1)
content = re.sub("CLANG_SUB_REVISION = [0-9]+", content = re.sub("CLANG_SUB_REVISION = [0-9]+",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment