Bug 13734
| Summary: | svn-create-patch could check for most obvious mistakes in patches | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Kimmo Kinnunen <kkinnunen> |
| Component: | Tools / Tests | Assignee: | 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
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 | ||
|---|---|---|
| Add attachment proposed patch, testcase, etc. |
Kimmo Kinnunen
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)
Yes, that does make sense!