RESOLVED FIXED 9395
Make prepare-ChangeLog faster
https://bugs.webkit.org/show_bug.cgi?id=9395
Summary Make prepare-ChangeLog faster
David Kilzer (:ddkilzer)
Reported 2006-06-10 14:29:35 PDT
Currently, prepare-ChangeLog does the following time-consuming things: 1. Runs "svn stat" on the entire WebKit directory to find the files that have changed. 2. Runs "svn diff" only on the files that were changed from Step 1 to find the changed lines. 3. Runs "svn diff" on the entire LayoutTests directory if there are any changes to WebCore to find out if any tests have been changed or been added. Since "svn diff" runs much faster than "svn stat" on the entire WebKit directory, the following speeds up prepare-ChangeLog from about 2.5 minutes to just under 1 minute on a recent test (Bug 9394): 1. Run "svn diff" on the entire WebKit directory and save the output to a temp file. Then run "svn stat" only on the changed files from Step 1. 2. Use the the temp file from Step 1 to find the changed lines. 3. Set a variable ($changedLayoutTests) during "svn stat" for Step 1 to determine if any changes have been made to LayoutTests, saving the need to run "svn diff LayoutTests" later.
Attachments
Patch v1 (6.15 KB, patch)
2006-06-10 14:42 PDT, David Kilzer (:ddkilzer)
no flags
Patch v2 (6.12 KB, patch)
2006-06-11 12:12 PDT, David Kilzer (:ddkilzer)
darin: review+
David Kilzer (:ddkilzer)
Comment 1 2006-06-10 14:42:19 PDT
Created attachment 8800 [details] Patch v1 In addition to the changes from Comment #0: - Added -h|--help command-line switch and help message. - Moved up check for no changed files closer to the beginning of the script.
Geoffrey Garen
Comment 2 2006-06-11 11:05:26 PDT
Sweet! This patch looks good to me, but I'd like someone with more perl fu to give it a once-over. I think this + $changedLayoutTests = 1 if !$changedLayoutTests && $components[0] eq "LayoutTests"; would be clearer as this + $changedLayoutTests = 1 if $components[0] eq "LayoutTests";
David Kilzer (:ddkilzer)
Comment 3 2006-06-11 12:12:49 PDT
Created attachment 8811 [details] Patch v2 Same as Patch v1, but adjusted with feedback from Comment #2.
David Kilzer (:ddkilzer)
Comment 4 2006-06-11 12:14:42 PDT
(In reply to comment #2) > + $changedLayoutTests = 1 if $components[0] eq "LayoutTests"; I could also have made it: > + $changedLayoutTests ||= ($components[0] eq "LayoutTests"); :)
Rob Buis
Comment 5 2006-06-11 12:22:08 PDT
I think bug 6445 is a duplicate of this. Cheers, Rob.
David Kilzer (:ddkilzer)
Comment 6 2006-06-11 12:31:09 PDT
*** Bug 6445 has been marked as a duplicate of this bug. ***
Darin Adler
Comment 7 2006-06-11 16:23:36 PDT
Comment on attachment 8811 [details] Patch v2 Looks good. r=me
David Kilzer (:ddkilzer)
Comment 8 2006-06-11 16:45:31 PDT
Committed revision 14814. Had to make a minor change to the patch so that "OOPS" didn't appear in the prepare-ChangeLog file: Transmitting file data ..subversion/libsvn_client/commit.c:873: (apr_err=165001) svn: Commit failed (details follow): /SourceCache/subversion/subversion-3/subversion/subversion/libsvn_repos/hooks.c:106: (apr_err=165001) svn: 'pre-commit' hook failed with error output: svnlook: Can't write to stream: Broken pipe The following ChangeLog files contain OOPS: trunk/WebKitTools/Scripts/prepare-ChangeLog Please don't ever say "OOPS" in a ChangeLog file.
Note You need to log in before you can comment on or make changes to this bug.