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.
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.
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";
Created attachment 8811 [details] Patch v2 Same as Patch v1, but adjusted with feedback from Comment #2.
(In reply to comment #2) > + $changedLayoutTests = 1 if $components[0] eq "LayoutTests"; I could also have made it: > + $changedLayoutTests ||= ($components[0] eq "LayoutTests"); :)
I think bug 6445 is a duplicate of this. Cheers, Rob.
*** Bug 6445 has been marked as a duplicate of this bug. ***
Comment on attachment 8811 [details] Patch v2 Looks good. r=me
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.