diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-24 18:22:26 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-01-24 18:22:26 +0000 |
commit | 2f0cbb232b15ed0f1e0e05654a9caca0ae3d5290 (patch) | |
tree | 62e49efa9f282b6d8b8652893a4c3450857f3ae2 /webkit/build | |
parent | 110785be2414b3f041bf502368bb44e212a3c975 (diff) | |
download | chromium_src-2f0cbb232b15ed0f1e0e05654a9caca0ae3d5290.zip chromium_src-2f0cbb232b15ed0f1e0e05654a9caca0ae3d5290.tar.gz chromium_src-2f0cbb232b15ed0f1e0e05654a9caca0ae3d5290.tar.bz2 |
lastchange: handle the git-but-not-git-svn case
When we're using a git checkout of WebKit that hasn't had git-svn
set up, ignore the missing versioning information rather than
failing.
BUG=70606,private mails
Review URL: http://codereview.chromium.org/6267010
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72351 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/build')
-rwxr-xr-x | webkit/build/webkit_version.py | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/webkit/build/webkit_version.py b/webkit/build/webkit_version.py index 5811072..f488a2e 100755 --- a/webkit/build/webkit_version.py +++ b/webkit/build/webkit_version.py @@ -45,21 +45,24 @@ def GetWebKitRevision(webkit_dir, version_file): # "svn info" tells us what we want, but third_party/WebKit does *not* # point at the upstream repo. So instead we run svn info on the directory - # containing the versioning file (which is some subdirectory of WebKit), - # then strip that path back off of the resulting URL. + # containing the versioning file (which is some subdirectory of WebKit). version_file_dir = os.path.dirname(version_file) version_info = lastchange.FetchVersionInfo( default_lastchange=None, directory=os.path.join(webkit_dir, version_file_dir)) - # Now compute the real WebKit URL by stripping off the version file - # directory from the URL we get out of version_info. - # Further, we want to strip off the "http://svn..." from the left. - # This is the root URL from the repository. - assert version_info.url.startswith(version_info.root) - assert version_info.url.endswith(version_file_dir) - webkit_url = version_info.url[len(version_info.root):-len(version_file_dir)] - webkit_url = webkit_url.strip('/') + if (version_info.url.startswith(version_info.root) and + version_info.url.endswith(version_file_dir)): + # Now compute the real WebKit URL by stripping off the version file + # directory from the URL we get out of version_info. + # Further, we want to strip off the "http://svn..." from the left. + # This is the root URL from the repository. + webkit_url = version_info.url[len(version_info.root):-len(version_file_dir)] + webkit_url = webkit_url.strip('/') + else: + # The data isn't as we expect: perhaps they're using git without svn? + # Just dump the output directly. + webkit_url = version_info.url return "%s@%s" % (webkit_url, version_info.revision) |