Bug 29190

Summary: commit-log-editor should move common prefixes to the top of the commit log
Product: WebKit Reporter: Adam Roben (:aroben) <aroben>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ddkilzer, eric
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Other   
OS: All   
Attachments:
Description Flags
Patch v1 darin: review+

Description Adam Roben (:aroben) 2009-09-11 09:58:28 PDT
Created attachment 39445 [details]
Patch v1

It's silly to have common prefixes in ChangeLogs (e.g., bug title/URL + reviewer) repeated in the commit log. Let's move common prefixes to the top of the log instead.
Comment 1 David Kilzer (:ddkilzer) 2009-09-12 05:04:04 PDT
Comment on attachment 39445 [details]
Patch v1

> +    foreach my $key (keys %{$hashOfStrings}) {
> +        $hashOfStrings->{$key} = substr($hashOfStrings->{$key}, $lastDoubleNewline);

Don't you want to use ($lastDoubleNewline + 2) here as well?

> +    }
> +    return substr($prefix, 0, $lastDoubleNewline + 2);
> +}

Otherwise this looks great!
Comment 2 Adam Roben (:aroben) 2009-09-14 09:01:35 PDT
(In reply to comment #1)
> (From update of attachment 39445 [details])
> > +    foreach my $key (keys %{$hashOfStrings}) {
> > +        $hashOfStrings->{$key} = substr($hashOfStrings->{$key}, $lastDoubleNewline);
> 
> Don't you want to use ($lastDoubleNewline + 2) here as well?

The current behavior is what we want. The leading double newline that's left on each ChangeLog entry ends up right after the label for that ChangeLog, like "WebCore:\n\nUnique part of the entry".

But even though this is the behavior we want, it does seem a bit subtle. It would probably be better to strip the leading double newline from each entry, then explicitly add the double newline after each label.
Comment 3 Eric Seidel (no email) 2009-09-18 13:24:26 PDT
This was landed on Sept 11th as r48307.

/me points aroben at 'bugzilla-tool land-diff' as an svn ci replacement. :)  It will auto-close the bug for you. :)  You can even pass --no-build or --no-test if you don't want it to bother automatically doing one-last build and test cycle for you before landing. :)