Title: [223033] trunk/Tools
Revision
223033
Author
[email protected]
Date
2017-10-08 13:30:32 -0700 (Sun, 08 Oct 2017)

Log Message

Make sort-Xcode-project file handle UnifiedSources
https://bugs.webkit.org/show_bug.cgi?id=178042

Reviewed by Sam Weinig.

Sort the UnifiedSource(\d+) files by number rather
than alphabetically.

* Scripts/sort-Xcode-project-file:
(sortChildrenByFileName):
(sortFilesByFileName):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (223032 => 223033)


--- trunk/Tools/ChangeLog	2017-10-08 17:18:29 UTC (rev 223032)
+++ trunk/Tools/ChangeLog	2017-10-08 20:30:32 UTC (rev 223033)
@@ -1,3 +1,17 @@
+2017-10-08  Dean Jackson  <[email protected]>
+
+        Make sort-Xcode-project file handle UnifiedSources
+        https://bugs.webkit.org/show_bug.cgi?id=178042
+
+        Reviewed by Sam Weinig.
+
+        Sort the UnifiedSource(\d+) files by number rather
+        than alphabetically.
+
+        * Scripts/sort-Xcode-project-file:
+        (sortChildrenByFileName):
+        (sortFilesByFileName):
+
 2017-09-29  Filip Pizlo  <[email protected]>
 
         Enable gigacage on iOS

Modified: trunk/Tools/Scripts/sort-Xcode-project-file (223032 => 223033)


--- trunk/Tools/Scripts/sort-Xcode-project-file	2017-10-08 17:18:29 UTC (rev 223032)
+++ trunk/Tools/Scripts/sort-Xcode-project-file	2017-10-08 20:30:32 UTC (rev 223033)
@@ -160,6 +160,11 @@
     if ((!$aSuffix && !$isFile{$aFileName} && $bSuffix) || ($aSuffix && !$bSuffix && !$isFile{$bFileName})) {
         return !$aSuffix ? -1 : 1;
     }
+    if ($aFileName =~ /^UnifiedSource\d+/ && $bFileName =~ /^UnifiedSource\d+/) {
+        my $aNumber = $1 if $aFileName =~ /^UnifiedSource(\d+)\./;
+        my $bNumber = $1 if $bFileName =~ /^UnifiedSource(\d+)\./;
+        return $aNumber <=> $bNumber;
+    }
     return lc($aFileName) cmp lc($bFileName);
 }
 
@@ -168,5 +173,10 @@
     my ($a, $b) = @_;
     my $aFileName = $1 if $a =~ /^\s*[A-Z0-9]{24} \/\* (.+) in /;
     my $bFileName = $1 if $b =~ /^\s*[A-Z0-9]{24} \/\* (.+) in /;
+    if ($aFileName =~ /^UnifiedSource\d+/ && $bFileName =~ /^UnifiedSource\d+/) {
+        my $aNumber = $1 if $aFileName =~ /^UnifiedSource(\d+)\./;
+        my $bNumber = $1 if $bFileName =~ /^UnifiedSource(\d+)\./;
+        return $aNumber <=> $bNumber;
+    }
     return lc($aFileName) cmp lc($bFileName);
 }
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to