Bug 16120 - git-add-ChangeLogs script would be useful
Summary: git-add-ChangeLogs script would be useful
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: 528+ (Nightly build)
Hardware: Macintosh OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-24 12:46 PST by Eric Seidel (no email)
Modified: 2016-02-03 13:22 PST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-11-24 12:46:32 PST
git-add-ChangeLogs script would be useful

I'm finding myself doing the same operation over and over again as I go through the patches on bug 16036 for landing.  I'm going through a rebase -i trunk and "edit"-ing each of my changes to have a ChangeLog with reviewer.  It would be really nice if there was a way to do this programatically, by passing a command some text file all at once.  For example.  If I could run:

get-add-ChangeLogs trunk

and it would open up my $EDITOR with a modified version of the -i "pick" file, where I could also specify reviewers and whether I wanted to stop and edit the ChangeLog, that would be great!

Then it could just go through and do all the changelog additions for me, stopping only when needed.

Curious what other git users think.
Comment 1 Adam Roben (:aroben) 2007-11-24 13:34:16 PST
I have a script, git-add-reviewer, which replaces the "NOBODY (OOPS!)" in the ChangeLogs/commit log for a particular commit with a name you specify on the command line. I've been wanting to make it work better for series of commits (right now you have to run the script in a loop). Maybe this would be enough for you?
Comment 2 Eric Seidel (no email) 2007-11-24 13:54:44 PST
Hum.. interesting.  I haven't been adding the ChangeLogs until right before final commits, but I guess I could.  It would stop Sam from complaining about my patches not having change logs. ;)  In that case, your script would probably work great.
Comment 3 Eric Seidel (no email) 2007-11-24 14:03:32 PST
Well, so one aspect of my current system is that I just commit willie-nillie knowing that I'll fix up teh commits for final (including possibly squashing) at the end.  I also use git-style one-liner commit logs, which I would want whatever script to replace for me in preparing the final commits.
Comment 4 David Kilzer (:ddkilzer) 2007-11-24 14:59:09 PST
I almost always write ChangeLog entries, but then you must resolve the inevitable ChangeLog conflicts using the resolve-ChangeLogs script.

Comment 5 Adam Roben (:aroben) 2007-11-24 15:03:25 PST
Maybe we should make a git-commit-log-editor script that prepopulates the commit log with the ChangeLog template(s). Then you can fill in your "ChangeLog" entry as you commit each change (or you can do it when you squash commits together), and you'll avoid running into ChangeLog conflicts. Then we can have some other script, like git-add-ChangeLogs, that works on a range of commits and turns the commit logs into ChangeLog entries. You would run git-add-ChangeLogs just before running git svn dcommit.

Eric and Dave, what do you think?
Comment 6 Adam Roben (:aroben) 2007-11-24 15:05:19 PST
This git-commit-log-editor script would also allow us to get rid of ChangeLogs entirely, eventually.
Comment 7 David Kilzer (:ddkilzer) 2007-11-24 15:09:48 PST
(In reply to comment #5)
> Eric and Dave, what do you think?

Sounds nice!  Does no one else set the GIT_EDITOR environment variable to WebKitTools/Scripts/commit-log-editor?

(In reply to comment #6)
> This git-commit-log-editor script would also allow us to get rid of ChangeLogs
> entirely, eventually.

Blasphemy!  ;)  We'd have to switch to git from svn before that would be possible.  (More blasphemy!)

On a related note, I don't like that git doesn't do a good job of following file history through copies and renames.  Am I missing a command-line option for git-log?

Comment 8 Adam Roben (:aroben) 2007-11-24 15:20:21 PST
(In reply to comment #7)
> (In reply to comment #5)
> > Eric and Dave, what do you think?
> 
> Sounds nice!  Does no one else set the GIT_EDITOR environment variable to
> WebKitTools/Scripts/commit-log-editor?

I set the core.editor config variable to commit-log-editor.

> (In reply to comment #6)
> > This git-commit-log-editor script would also allow us to get rid of ChangeLogs
> > entirely, eventually.
> 
> Blasphemy!  ;)  We'd have to switch to git from svn before that would be
> possible.  (More blasphemy!)

Yeah, I'm not suggesting we get rid of ChangeLogs while still using Subversion.

> On a related note, I don't like that git doesn't do a good job of following
> file history through copies and renames.  Am I missing a command-line option
> for git-log?

git log --follow
Comment 9 Joseph Pecoraro 2010-04-11 01:00:36 PDT
Is something like this still desired?
Comment 10 Brian Burg 2016-02-03 13:21:32 PST
This is redundant with `git-add-reviewer -i`, as far as I can tell.
Comment 11 Brian Burg 2016-02-03 13:22:13 PST
(In reply to comment #10)
> This is redundant with `git-add-reviewer -i`, as far as I can tell.

Especially since you can't get a review without a Changelog.