Title: [215381] trunk/Tools
Revision
215381
Author
commit-qu...@webkit.org
Date
2017-04-14 17:09:35 -0700 (Fri, 14 Apr 2017)

Log Message

webkit-patch failed to detect git repository
https://bugs.webkit.org/show_bug.cgi?id=170859

Patch by Bill Ming <mbb...@gmail.com> on 2017-04-14
Reviewed by Daniel Bates.

Windows cmd does not accept single quoted path. So, using
double quotes here will provide better platform compatibility.

* Scripts/VCSUtils.pm:
(isGitDirectory):
(isGitSVNDirectory):
(svnRevisionForDirectory):
(svnInfoForPath):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (215380 => 215381)


--- trunk/Tools/ChangeLog	2017-04-14 23:26:52 UTC (rev 215380)
+++ trunk/Tools/ChangeLog	2017-04-15 00:09:35 UTC (rev 215381)
@@ -1,3 +1,19 @@
+2017-04-14  Bill Ming  <mbb...@gmail.com>
+
+        webkit-patch failed to detect git repository
+        https://bugs.webkit.org/show_bug.cgi?id=170859
+
+        Reviewed by Daniel Bates.
+
+        Windows cmd does not accept single quoted path. So, using
+        double quotes here will provide better platform compatibility.
+
+        * Scripts/VCSUtils.pm:
+        (isGitDirectory):
+        (isGitSVNDirectory):
+        (svnRevisionForDirectory):
+        (svnInfoForPath):
+
 2017-04-14  Ryan Haddad  <ryanhad...@apple.com>
 
         Unreviewed, rolling out r215374.

Modified: trunk/Tools/Scripts/VCSUtils.pm (215380 => 215381)


--- trunk/Tools/Scripts/VCSUtils.pm	2017-04-14 23:26:52 UTC (rev 215380)
+++ trunk/Tools/Scripts/VCSUtils.pm	2017-04-15 00:09:35 UTC (rev 215381)
@@ -223,7 +223,7 @@
 sub isGitDirectory($)
 {
     my ($directory) = @_;
-    return system("git -C '$directory' rev-parse > " . File::Spec->devnull() . " 2>&1") == 0;
+    return system("git -C \"$directory\" rev-parse > " . File::Spec->devnull() . " 2>&1") == 0;
 }
 
 sub isGit()
@@ -241,7 +241,7 @@
     # There doesn't seem to be an officially documented way to determine
     # if you're in a git-svn checkout. The best suggestions seen so far
     # all use something like the following:
-    my $output = `git -C '$directory' config --get svn-remote.svn.fetch 2>&1`;
+    my $output = `git -C \"$directory\" config --get svn-remote.svn.fetch 2>&1`;
     $isGitSVN = exitStatus($?) == 0 && $output ne "";
     return $isGitSVN;
 }
@@ -432,7 +432,7 @@
         my $svnInfo = `$command`;
         ($revision) = ($svnInfo =~ m/Revision: (\d+).*/g);
     } elsif (isGitDirectory($directory)) {
-        my $command = "git -C '$directory' log --grep=\"git-svn-id: \" -n 1 | grep git-svn-id:";
+        my $command = "git -C \"$directory\" log --grep=\"git-svn-id: \" -n 1 | grep git-svn-id:";
         $command = "LC_ALL=C $command" if !isWindows();
         my $gitLog = `$command`;
         ($revision) = ($gitLog =~ m/ +git-svn-id: .+@(\d+) /g);
@@ -456,7 +456,7 @@
         $command = "LC_ALL=C $command" if !isWindows();
         $svnInfo = `$command`;
     } elsif (isGitDirectory($file)) {
-        my $command = "git -C '$file' svn info";
+        my $command = "git -C \"$file\" svn info";
         $command = "LC_ALL=C $command" if !isWindows();
         $svnInfo = `$command`;
     }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to