On Thu, Feb 6, 2020 at 11:25 PM Segher Boessenkool <seg...@kernel.crashing.org> wrote: > > On Thu, Feb 06, 2020 at 03:01:20PM +0100, Richard Biener wrote: > > On Thu, Feb 6, 2020 at 2:51 PM Segher Boessenkool > > <seg...@kernel.crashing.org> wrote: > > > If you rebase changelog files, then yes, it's a bloody pain ;-) > > > > So do you have a script that takes a commit with a ChangeLog at its end > > and populates the appropriate ChangeLog files? > > I develop my patches in Git, no changelog whatsoever. Then I "git > format-patch" it. I write the changelog in that file (also proper white > space, which "git commit" likes to destroy, I have a patch for that but > not installed everywhere). "git send-email", wait for ack if necessary, > "git am" and copy-and-paste the changelog parts, "git add" those > changelog files, "git commit --amend", final sanity checks, and "git > commit fsf master". I store the patch file to my archive, or I queue it > for backport directly. > > > I'm trying to come up with > > one to make the process less manual ... > > Yeah, don't look at me then :-) > > I *like* having most of those steps, most of this should only be done by > people who are awake. > > > it's definitely a part that requires > > more typing compared to svn. > > Instead of "git am" I had "patch -p1 <", distributing the changelog parts > I just did in vi (as with git), then "svn ci", which pick up all modified > files directly (sometimes an "svn add" first). It's pretty much the same > for me.
I'm a believer on committing from the tree I actually tested, so it was with SVN: patch, test, svn up, edit changelogs (cut&paste from the patch header), svn diff | less (check wha'ts abotu to be committed), svn commit with GIT its now: patch, test, git add/commit, git pull --rebase, edit changelogs (cut&paste from the patch header), git commit --amend, git push -n -v, git show <what's pushed>, git push So I wonder to "optimize" this somewhat. > > ChangeLog file populating could be even > > done on the server-side I guess (and not appropriately formatted logs > > for the extraction/moving process rejected). > > Yup. As long as it's fool-proof, and we have some way to correct small > disasters (both of those!) I'd definitely prefer server-side operation, and yes, that "script" looking at the commit would need to have a "extract changelog parts" part for a pre-accept hook and the actual part amending the commit with the changelog file changes (not sure if that's even possible in a hook?). Fixing mistakes in the ChangeLog files could be as easy as allowing changes to ChangeLog files without that magic. Anyway, I hope to put sth together with bash & [g]awk Richard. > > Segher