From 7e8e1bc34c946f7f361bfd16c2628170b55dd45a Mon Sep 17 00:00:00 2001 From: binji Date: Wed, 10 Sep 2014 16:11:15 -0700 Subject: [NaCl SDK] Never check SVN or git-svn for Chromium repo. This will need to be merged back to M38. No trybots because this only affects the NaCl SDK build. BUG=none R=bradnelson@chromium.org NOTRY=true Review URL: https://codereview.chromium.org/559233002 Cr-Commit-Position: refs/heads/master@{#294253} --- native_client_sdk/src/build_tools/build_version.py | 23 ++-------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/native_client_sdk/src/build_tools/build_version.py b/native_client_sdk/src/build_tools/build_version.py index cb94488..014b86e 100644 --- a/native_client_sdk/src/build_tools/build_version.py +++ b/native_client_sdk/src/build_tools/build_version.py @@ -28,7 +28,7 @@ def ChromeVersion(): Returns: Chrome version string or trunk + svn rev. ''' - info = FetchVersionInfo() + info = FetchGitCommitPosition() if info.url == 'git': _, ref, revision = ParseCommitPosition(info.revision) if ref == 'refs/heads/master': @@ -88,26 +88,7 @@ def NaClRevision(): The NaCl revision as a string. e.g. "12345" ''' nacl_dir = os.path.join(SRC_DIR, 'native_client') - return FetchVersionInfo(nacl_dir, 'native_client').revision - - -def FetchVersionInfo(directory=None, - directory_regex_prior_to_src_url='chrome|blink|svn'): - '''Returns the last change (in the form of a branch, revision tuple), - from some appropriate revision control system. - - TODO(binji): This is copied from lastchange.py. Remove this function and use - lastchange.py directly when the dust settles. (see crbug.com/406783) - ''' - svn_url_regex = re.compile( - r'.*/(' + directory_regex_prior_to_src_url + r')(/.*)') - - version_info = (lastchange.FetchSVNRevision(directory, svn_url_regex) or - lastchange.FetchGitSVNRevision(directory, svn_url_regex) or - FetchGitCommitPosition(directory)) - if not version_info: - version_info = lastchange.VersionInfo(None, None) - return version_info + return lastchange.FetchVersionInfo(None, nacl_dir, 'native_client').revision def FetchGitCommitPosition(directory=None): -- cgit v1.1