Changeset 247503 in webkit


Ignore:
Timestamp:
Jul 16, 2019 9:16:06 PM (5 years ago)
Author:
Jonathan Bedard
Message:

svn-create-patch duplicates diffs when adding directories
https://bugs.webkit.org/show_bug.cgi?id=199842

Reviewed by Dewei Zhu.

  • Scripts/svn-create-patch:

(findKind): Add function which returns what 'kind' of file the provided path is.
(generateFileList): If the path is a directory and being added, don't add it.
Instead, rely on the fact that its children will be added.

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/ChangeLog

    r247490 r247503  
     12019-07-16  Jonathan Bedard  <jbedard@apple.com>
     2
     3        svn-create-patch duplicates diffs when adding directories
     4        https://bugs.webkit.org/show_bug.cgi?id=199842
     5
     6        Reviewed by Dewei Zhu.
     7
     8        * Scripts/svn-create-patch:
     9        (findKind): Add function which returns what 'kind' of file the provided path is.
     10        (generateFileList): If the path is a directory and being added, don't add it.
     11        Instead, rely on the fact that its children will be added.
     12
    1132019-07-16  Tim Horton  <timothy_horton@apple.com>
    214
  • trunk/Tools/Scripts/svn-create-patch

    r235733 r247503  
    5252sub diffOptionsForFile($);
    5353sub findBaseUrl($);
     54sub findKind($);
    5455sub findMimeType($;$);
    5556sub findModificationType($);
     
    177178}
    178179
     180sub findKind($)
     181{
     182    my ($path) = @_;
     183    my $kind;
     184    my $escapedInfoPath = escapeSubversionPath($path);
     185
     186    print STDERR "Performing \"svn info '$escapedInfoPath'\"\n" if $verbose;
     187
     188    open INFO, "svn info '$escapedInfoPath' |" or die;
     189    while (<INFO>) {
     190        if (/^Node Kind: (.+?)[\r\n]*$/) {
     191            $kind = $1;
     192        }
     193    }
     194    close INFO;
     195    return $kind;
     196}
     197
    179198sub findMimeType($;$)
    180199{
     
    327346        if ($modificationType eq "deletion") {
    328347            push @deletedFiles, $path;
     348            next;
     349        }
     350
     351        if (findKind($path) eq "directory") {
    329352            next;
    330353        }
Note: See TracChangeset for help on using the changeset viewer.