Call fixChangeLogPatch when generating patches from webkit-patch
authorbasile_clement@apple.com <basile_clement@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jul 2015 20:22:58 +0000 (20:22 +0000)
committerbasile_clement@apple.com <basile_clement@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 24 Jul 2015 20:22:58 +0000 (20:22 +0000)
commitef20fd6f0ed9c052dab2073074139329adb8f912
treeeb28dba78245ecc13de8ffa414b48402a8bd2256
parentb2902ff931bb510c24647499bc83c4ab0f75e09d
Call fixChangeLogPatch when generating patches from webkit-patch
https://bugs.webkit.org/show_bug.cgi?id=147248

Reviewed by Geoffrey Garen.

When two consecutive patches are from the same author, diff tools
create wrong-looking diffs for ChangeLog files where the apparent added
author is actually the previous patch's author line, making it awkward
to read - and things only get worse when committing a patch and a
followup fix for the same bug shortly after.

We have a perl function in VCSUtils.pm, fixChangeLogPatch, to corrects
this, which we use in perl scripts (svn-create-patch et al). But it is
not used by webkit-patch, which is a python script, and thus creates
"bad" diffs.

In the long term, we should probably port fixChangeLogPatch to python -
but in the short term, let's make webkit-patch call perl to run
fixChangeLogPatch. We are already making various external calls there
anyway.

* Scripts/webkitpy/common/checkout/scm/git.py:
(Git.create_patch):
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM.fix_changelog_patch):
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN.create_patch):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@187357 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Tools/ChangeLog
Tools/Scripts/webkitpy/common/checkout/scm/git.py
Tools/Scripts/webkitpy/common/checkout/scm/scm.py
Tools/Scripts/webkitpy/common/checkout/scm/svn.py