2 webkit/build/webkit_version.py | 9 +++++++++
3 1 file changed, 9 insertions(+)
5 Index: src/webkit/build/webkit_version.py
6 ===================================================================
7 --- ./src.orig/webkit/build/webkit_version.py
8 +++ ./src/webkit/build/webkit_version.py
10 # "svn info" tells us what we want, but third_party/WebKit does *not*
11 # point at the upstream repo. So instead we run svn info on the directory
12 # containing the versioning file (which is some subdirectory of WebKit).
13 version_file_dir = os.path.dirname(version_file)
14 version_info = lastchange.FetchVersionInfo(
15 default_lastchange=None,
16 directory=os.path.join(webkit_dir, version_file_dir))
18 + if version_info.url is None or version_info.url == 'unknown':
19 + # parse the DEPS file
20 + data = open("../../DEPS", "rb").read()
21 + x = re.search(r'"webkit_revision": "(\d+)",', data)
22 + rev = x.group(1) if x else "n-a"
23 + x = re.search(r'"webkit_trunk": "(.*?)",', data)
24 + branch = os.path.basename(x.group(1)) if x else "n-a"
25 + return "%s@%s" % (branch, rev)
27 if (version_info.url.startswith(version_info.root) and
28 version_info.url.endswith(version_file_dir)):
29 # Now compute the real WebKit URL by stripping off the version file
30 # directory from the URL we get out of version_info.
31 # Further, we want to strip off the "http://svn..." from the left.
32 # This is the root URL from the repository.
33 webkit_url = version_info.url[len(version_info.root):-len(version_file_dir)]
34 webkit_url = webkit_url.strip('/')