For git users, especially those working on local branches, it would be very helpful to have the git commit messages in WebKit ChangeLog entry format. Keeping the ChangeLog entries in the git commits instead of modifying the actual ChangeLog files avoids many conflicts during development (especially when doing rebases). My intention is that the ChangeLog files will be updated properly before the commits are pushed upstream, of course. The change will involve modifying prepare-ChangeLog and commit-log-editor so that using the workflow in http://trac.webkit.org/wiki/UsingGitWithWebKit (specifically using commit-log-editor as the git core.editor) will work nicely.
Created attachment 33330 [details] patch to add --[no-]write option to prepare-ChangeLog to put new entries on stdout instead of modifiying ChangeLog files
Created attachment 33334 [details] revised patch to handle top-level changes properly
Comment on attachment 33334 [details] revised patch to handle top-level changes properly > diff --git a/WebKitTools/ChangeLog b/WebKitTools/ChangeLog > index 26eae74..654f679 100644 > --- a/WebKitTools/ChangeLog > +++ b/WebKitTools/ChangeLog > @@ -1,3 +1,17 @@ > +2009-07-23 Eli Fidler <eli.fidler@torchmobile.com> > + > + Reviewed by NOBODY (OOPS!). > + > + Improve git workflow by populating commit messages with ChangeLog entries. > + https://bugs.webkit.org/show_bug.cgi?id=27605 > + > + add --[no-]write option to optionally output new ChangeLog entries to > + stdout instead of modifying ChangeLog files > + > + fix Torch Mobile copyright Please fix the indentation. > -# Add command line option to put the ChangeLog into a separate > -# file or just spew it out stdout. > +# Add command line option to put the ChangeLog into a separate file. Hmm, so this functionality supposedly existed at one point... > + if ($prefixDir eq "top level") { > + $sortKey = ""; > + } elsif ($prefixDir eq "Tools") { > + $sortKey = "-, just after top level"; > + } elsif ($prefixDir eq "WebBrowser") { > + $sortKey = lc "WebKit, WebBrowser after"; > + } elsif ($prefixDir eq "WebCore") { > + $sortKey = lc "WebFoundation, WebCore after"; I understand that this logic was taken from commit-log-editor. It'd be nice for an explanation of where 'WebBrowser' and 'WebFoundation' come from, but I suspect only the Apple folks would be able to provide that. Still, it is good to match commit-log-editor. The patch looks good minus the minor nits above. One semi-ugly thing is that prepare-ChangeLog also writes to stderr by default a bunch of verbosity. It is not important for our use case, but perhaps a header or a line break should be written to stderr right before we write to stdout to separate the two. r- for the ChangeLog above. Cheers, Adam
btw, if you feel so inspired, feel free to add your new option to WebKitTools/Scripts/webkit-tools-completion.sh
Created attachment 33338 [details] updated patch to fix ChangeLog indentation
First patch landed with r46270.
Created attachment 33373 [details] add new prepare-ChangeLog options to bash completion script
Created attachment 33376 [details] If the user doesn't modify the ChangeLog files in the git commit, use prepare-ChangeLog to populate the git commit message.
Comment on attachment 33373 [details] add new prepare-ChangeLog options to bash completion script > +complete -W "--bug --diff --git-commit --git-index --git-reviewer --help --no-update --open --update -d -h -o --write --no-write" prepare-ChangeLog Believe it or not, these are actually all sorted, but this can be fixed on landing. :)
Comment on attachment 33338 [details] updated patch to fix ChangeLog indentation Clearing r+ since it was landed.
Comment on attachment 33373 [details] add new prepare-ChangeLog options to bash completion script Clearing r+. Landed as http://trac.webkit.org/changeset/46349
Created attachment 33469 [details] add git configuration option to disable populating commit message
Comment on attachment 33469 [details] add git configuration option to disable populating commit message I think we should prepend 'webKit' to the git config name otherwise this is perfect. The change can be made when landing...
Landed with r46375. Closing bug as fixed now.