WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
Bug 27605
Improve git workflow by populating commit messages with ChangeLog entries.
https://bugs.webkit.org/show_bug.cgi?id=27605
Summary
Improve git workflow by populating commit messages with ChangeLog entries.
Eli Fidler
Reported
2009-07-23 08:14:45 PDT
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.
Attachments
patch to add --[no-]write option to prepare-ChangeLog to put new entries on stdout instead of modifiying ChangeLog files
(7.70 KB, patch)
2009-07-23 08:27 PDT
,
Eli Fidler
no flags
Details
Formatted Diff
Diff
revised patch to handle top-level changes properly
(7.76 KB, patch)
2009-07-23 08:52 PDT
,
Eli Fidler
manyoso
: review-
Details
Formatted Diff
Diff
updated patch to fix ChangeLog indentation
(7.77 KB, patch)
2009-07-23 09:22 PDT
,
Eli Fidler
no flags
Details
Formatted Diff
Diff
add new prepare-ChangeLog options to bash completion script
(2.05 KB, patch)
2009-07-23 14:26 PDT
,
Eli Fidler
no flags
Details
Formatted Diff
Diff
If the user doesn't modify the ChangeLog files in the git commit, use prepare-ChangeLog to populate the git commit message.
(2.34 KB, patch)
2009-07-23 14:32 PDT
,
Eli Fidler
no flags
Details
Formatted Diff
Diff
add git configuration option to disable populating commit message
(2.88 KB, patch)
2009-07-24 13:42 PDT
,
Eli Fidler
manyoso
: review+
Details
Formatted Diff
Diff
Show Obsolete
(3)
View All
Add attachment
proposed patch, testcase, etc.
Eli Fidler
Comment 1
2009-07-23 08:27:27 PDT
Created
attachment 33330
[details]
patch to add --[no-]write option to prepare-ChangeLog to put new entries on stdout instead of modifiying ChangeLog files
Eli Fidler
Comment 2
2009-07-23 08:52:57 PDT
Created
attachment 33334
[details]
revised patch to handle top-level changes properly
Adam Treat
Comment 3
2009-07-23 09:06:52 PDT
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
David Levin
Comment 4
2009-07-23 09:12:52 PDT
btw, if you feel so inspired, feel free to add your new option to WebKitTools/Scripts/webkit-tools-completion.sh
Eli Fidler
Comment 5
2009-07-23 09:22:03 PDT
Created
attachment 33338
[details]
updated patch to fix ChangeLog indentation
Adam Treat
Comment 6
2009-07-23 09:33:33 PDT
First patch landed with
r46270
.
Eli Fidler
Comment 7
2009-07-23 14:26:05 PDT
Created
attachment 33373
[details]
add new prepare-ChangeLog options to bash completion script
Eli Fidler
Comment 8
2009-07-23 14:32:26 PDT
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.
David Levin
Comment 9
2009-07-23 14:38:32 PDT
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. :)
David Levin
Comment 10
2009-07-23 14:40:04 PDT
Comment on
attachment 33338
[details]
updated patch to fix ChangeLog indentation Clearing r+ since it was landed.
David Levin
Comment 11
2009-07-24 03:52:11 PDT
Comment on
attachment 33373
[details]
add new prepare-ChangeLog options to bash completion script Clearing r+. Landed as
http://trac.webkit.org/changeset/46349
Eli Fidler
Comment 12
2009-07-24 13:42:14 PDT
Created
attachment 33469
[details]
add git configuration option to disable populating commit message
Adam Treat
Comment 13
2009-07-24 13:49:29 PDT
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...
Adam Treat
Comment 14
2009-07-24 14:18:45 PDT
Landed with
r46375
. Closing bug as fixed now.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug