diff options
author | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-12 01:46:33 +0000 |
---|---|---|
committer | evan@chromium.org <evan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-12 01:46:33 +0000 |
commit | 6ae2c057c862373ff4c8b7c9f01e708895c594d4 (patch) | |
tree | 43bf11ad5109547b1d5bfa3659f74280c8fbd5ee /build | |
parent | 070797d95e72a63f8b337e4e7d434ed82ce16110 (diff) | |
download | chromium_src-6ae2c057c862373ff4c8b7c9f01e708895c594d4.zip chromium_src-6ae2c057c862373ff4c8b7c9f01e708895c594d4.tar.gz chromium_src-6ae2c057c862373ff4c8b7c9f01e708895c594d4.tar.bz2 |
lastchange: don't check git state for whether the tree is dirty
We don't show whether the tree was dirty for SVN.
Because lastchange runs on every build, these commands impact every
build. The call to "git checkout" makes git stat every file in the
repository (including ones unrelated to the build).
This change makes a Ninja build of Chrome 20% faster. I've seen the
command take tens of seconds on a cold disk, and it likely has a
larger impact on Windows where the disk is slower.
Review URL: http://codereview.chromium.org/9148030
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@117352 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rwxr-xr-x | build/util/lastchange.py | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/build/util/lastchange.py b/build/util/lastchange.py index 870bf07..df8bcf8 100755 --- a/build/util/lastchange.py +++ b/build/util/lastchange.py @@ -1,5 +1,5 @@ #!/usr/bin/env python -# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Copyright (c) 2012 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. @@ -135,30 +135,6 @@ def FetchGitSVNURLAndRevision(directory, svn_url_regex): return None, None -def IsGitSVNDirty(directory): - """ - Checks whether our git-svn tree contains clean trunk or any local changes. - - Errors are swallowed. - """ - proc = RunGitCommand(directory, ['log', '-1']) - if proc: - output = proc.communicate()[0].strip() - if proc.returncode == 0 and output: - # Extract the latest SVN revision and the SVN URL. - # The target line is the last "git-svn-id: ..." line like this: - # git-svn-id: svn://svn.chromium.org/chrome/trunk/src@85528 0039d316.... - match = _GIT_SVN_ID_REGEX.search(output) - if match: - # Check if there are any local uncommitted changes. - proc = RunGitCommand(directory, ['checkout']) - if proc: - output = proc.communicate()[0].strip() - if proc.returncode == 0 and not output: - return False - return True - - def FetchGitSVNRevision(directory, svn_url_regex): """ Fetch the Git-SVN identifier for the local tree. @@ -167,8 +143,6 @@ def FetchGitSVNRevision(directory, svn_url_regex): """ url, revision = FetchGitSVNURLAndRevision(directory, svn_url_regex) if url and revision: - if IsGitSVNDirty(directory): - revision = revision + '-dirty' return VersionInfo(url, revision) return None |