Bug 13734

Summary: svn-create-patch could check for most obvious mistakes in patches
Product: WebKit Reporter: Kimmo Kinnunen <kkinnunen>
Component: Tools / TestsAssignee: Nobody <webkit-unassigned>
Status: RESOLVED CONFIGURATION CHANGED    
Severity: Enhancement CC: ddkilzer
Priority: P3    
Version: 523.x (Safari 3)   
Hardware: PC   
OS: OS X 10.4   

Kimmo Kinnunen
Reported 2007-05-15 11:06:53 PDT
The svn-create-patch chould check for the most obvious mistakes in the patches it creates. The tool could for example warn the author for the mistakes. A warning could be printed on at least following mistakes: - Tabs present in the modifications - Modifying files in a directory which would require ChangeLog entry
Attachments
Kimmo Kinnunen
Comment 1 2007-05-15 11:24:03 PDT
I don't know if it'd be useful to others, but I'll probably save following locally: Index: WebKitTools/Scripts/svn-create-patch =================================================================== --- WebKitTools/Scripts/svn-create-patch (revision 21458) +++ WebKitTools/Scripts/svn-create-patch (working copy) @@ -228,6 +228,10 @@ sub generateDiff($$$) close DIFF; $patch = fixChangeLogPatch($patch) if basename($file) eq "ChangeLog"; print $patch if $patch; + if ($patch =~ /^\+(\t|!\+.*\t)/mg ) { + print STDERR "Warning: changes in file '$file' contain tab characters.\n"; + } + if ($isBinary) { print "\n" if ($patch && $patch =~ m/\n\S+$/m); outputBinaryContent($file);
David Kilzer (:ddkilzer)
Comment 2 2007-05-15 22:45:06 PDT
Yes, that does make sense!
Note You need to log in before you can comment on or make changes to this bug.