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
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);
Yes, that does make sense!