lastchange.py is using git show -s to get the commit message of HEAD.
It turns out that on some older versions of git that is a rather
expensive operation. Under particular circumstances it can eventually
take several minutes (see crbug.com/431463 #27).
Anyways, git cat-file is x45 faster than the equivalent show command
for the sake of printing the commit message.
$ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
$ time git show -s --format=%B HEAD > /dev/null
real 0m0.090s
$ sudo sh -c 'echo 3 > /proc/sys/vm/drop_caches'
$ time git cat-file commit HEAD > /dev/null
real 0m0.002s
BUG=431463
Review URL: https://codereview.chromium.org/726413003
Cr-Original-Commit-Position: refs/heads/master@{#304444}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 5176f672c91c461a2f87f333e2b88ab407b2bc52
Even the 40-character hash causes problems when the pieces of the string before
it push the length to >64 characters. Truncating it is a temporary fix until
we discuss ways to accept strings longer than 64 chars.
R=cmp@chromium.org, scottmg@chromium.org
NOTRY=True
BUG=406783
Review URL: https://codereview.chromium.org/499133003
Cr-Original-Commit-Position: refs/heads/master@{#291626}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 15a2a65986f6dec827cce5bc7d58601ed9b1eb2a
This changes lastchange.py in two ways:
1) If the commit it finds is a Git hash, it outputs the whole hash, not just
the first 7 characters.
2) It only looks at HEAD to see if there is a git-svn id. Previously, it used
--grep=git-svn-id, which would find the most recent commit containing a
git-svn id. This would be broken after the switch to git, as it would always
find the last commit before the switch. Now, it only inspects the most recent
commit, and falls through to pure-Git if that fails.
R=dilmah@chromium.org, stip@chromium.org
BUG=399113
Review URL: https://codereview.chromium.org/488733002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@291165 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
This is GN-only so the GYP build currently sets this to 0.
This adds the root generated file directory to all targets, so you can do #include "foo/bar.h" and get a generated file "bar.h" generated in directory "foo". This basically matches the internal Google build, and I use it here.
BUG=
R=viettrungluu@chromium.org
Review URL: https://codereview.chromium.org/46003002
git-svn-id: http://src.chromium.org/svn/trunk/src/build@233969 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
The main reason for making this change is the fact that when pulling
Chromium and Blink code into Android, we have to make automatic changes
to the repository (for example, for generating *.mk files), and the Blink
commit we have as HEAD doesn't match any public commit in the main
Blink repo. While via the LASTCHANGE file we could report a publicly
visible revision.
Also, the way webkit_version.h header is generated now appears to be silly.
First, it doesn't leverage enough existing tools. Second, as it is noted in
webkit_user_agent.gypi, it is broken for incremental builds.
Review URL: https://chromiumcodereview.appspot.com/14973005
git-svn-id: http://src.chromium.org/svn/trunk/src/build@203387 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
When running as runhooks, it's not run via cygwin like it was when run in the build, and isn't able to find git. I believe the test that checked for both cygwin and win32 before was incorrect (but was always run via cygwin before so didn't matter).
Additionally, when runhooks runs it, it's from above src/, so the cwd isn't in the repo. So, pass in the directory of the script itself so that git can find its repo.
BUG=112264
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=120089
Review URL: https://chromiumcodereview.appspot.com/9317037
git-svn-id: http://src.chromium.org/svn/trunk/src/build@120110 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
When running as runhooks, it's not run via cygwin like it was when run in the build, and isn't able to find git. I believe the test that checked for both cygwin and win32 before was incorrect (but was always run via cygwin before so didn't matter).
Additionally, when runhooks runs it, it's from above src/, so the cwd isn't in the repo. So, pass in the directory of the script itself so that git can find its repo.
BUG=112264
Review URL: https://chromiumcodereview.appspot.com/9317037
git-svn-id: http://src.chromium.org/svn/trunk/src/build@120089 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
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: http://src.chromium.org/svn/trunk/src/build@117352 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
- Fetch Subversion URL and the revision from 'git log' even if git-svn is not available.
- Remove VersionInfo.root, since nobody is using it.
- Allow a user to specify the directory name just prior to the svn src URL.
FYI: We decided to split the changes of issue 7104106 (http://codereview.chromium.org/7104106/) into the following steps. This is the fifth step of them:
(1) Add CreateVersionString() to chrome_version_info.*, update the GTK+ code to use it. (reviewer: erg, tony)
(2) Update the mac code to use CreateVersionString(). Update About.xib. (reviewer: mark)
(3) Update the views code to use CreateVersionString(). This can happen at the same time as (2). (reviewer: davemoore, tony)
(4) Update version.bat to use lastchange.py. (reviewer: evan)
(5) Make changes to lastchange.py and webkit_version.py. (reviewer: evan, mark)
(6) Update tweak_info_plist to use lastchange.py. (reviewer: mark)
BUG=37186
TEST=Observe that "About Chromium" dialog shows the version string like "14.0.787.0 (Developer Build 88242 Windows" on Windows and Linux.
Review URL: http://codereview.chromium.org/7493073
git-svn-id: http://src.chromium.org/svn/trunk/src/build@94828 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
When fetching svn URL via 'git svn info --url' command
git-svn.perl script may print its progress log to stdout instead of stderr: as a result we end up using all this junk as svn repository URL.
Fix it by filtering output.
BUG=None
TEST=None
Review URL: http://codereview.chromium.org/6603022
git-svn-id: http://src.chromium.org/svn/trunk/src/build@76803 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Previous behaviour for git-svn repositories is to return git hash (this hash then appears on about:version page and can be copy-pasted into bugreport).
However for developer branches with local modifications this hash bears no information to the outside world.
Now we return svn revision for trunk git-svn checkouts and svn-revision plus "-dirty" suffix for git branches.
The magic required to run git on cygwin is factored out into separate function.
BUG=chromium:70909
TEST=Manual
Review URL: http://codereview.chromium.org/6474044
git-svn-id: http://src.chromium.org/svn/trunk/src/build@76530 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
- Change lastchange.py to work in other directories and to
provide SVN URL.
- Use lastchange.py in place where we generate WebKit versioning
info.
- Include branch@revision string in glue API.
BUG=41264
TEST=compiles
Review URL: http://codereview.chromium.org/6354014
git-svn-id: http://src.chromium.org/svn/trunk/src/build@72245 4ff67af0-8c30-449e-8e8b-ad334ec8d88c