Title: [150028] trunk/Tools
Revision
150028
Author
[email protected]
Date
2013-05-13 12:23:16 -0700 (Mon, 13 May 2013)

Log Message

[webkitpy] Make FileInfo.repository_name support SVN version > 1.6
https://bugs.webkit.org/show_bug.cgi?id=116016

Reviewed by Dirk Pranke.

Same fix as in the upstream style checker, but without hg support.
( http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py )

* Scripts/webkitpy/style/checkers/cpp.py:
(FileInfo.repository_name):

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (150027 => 150028)


--- trunk/Tools/ChangeLog	2013-05-13 19:11:33 UTC (rev 150027)
+++ trunk/Tools/ChangeLog	2013-05-13 19:23:16 UTC (rev 150028)
@@ -1,3 +1,16 @@
+2013-05-13  Csaba Osztrogonác  <[email protected]>
+
+        [webkitpy] Make FileInfo.repository_name support SVN version > 1.6
+        https://bugs.webkit.org/show_bug.cgi?id=116016
+
+        Reviewed by Dirk Pranke.
+
+        Same fix as in the upstream style checker, but without hg support.
+        ( http://google-styleguide.googlecode.com/svn/trunk/cpplint/cpplint.py )
+
+        * Scripts/webkitpy/style/checkers/cpp.py:
+        (FileInfo.repository_name):
+
 2013-05-13  Zan Dobersek  <[email protected]>
 
         [GTK] Use WebCore layer archives for TestWebCore, WebKitPluginProcess

Modified: trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py (150027 => 150028)


--- trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2013-05-13 19:11:33 UTC (rev 150027)
+++ trunk/Tools/Scripts/webkitpy/style/checkers/cpp.py	2013-05-13 19:23:16 UTC (rev 150028)
@@ -648,13 +648,16 @@
                 prefix = os.path.commonprefix([root_dir, project_dir])
                 return fullname[len(prefix) + 1:]
 
-            # Not SVN? Try to find a git top level directory by
+
+            # Not SVN <= 1.6? Try to find a git, or svn top level directory by
             # searching up from the current path.
             root_dir = os.path.dirname(fullname)
             while (root_dir != os.path.dirname(root_dir)
-                   and not os.path.exists(os.path.join(root_dir, ".git"))):
+                   and not os.path.exists(os.path.join(root_dir, ".git"))
+                   and not os.path.exists(os.path.join(root_dir, ".svn"))):
                 root_dir = os.path.dirname(root_dir)
-                if os.path.exists(os.path.join(root_dir, ".git")):
+                if (os.path.exists(os.path.join(root_dir, ".git")) or
+                   os.path.exists(os.path.join(root_dir, ".svn"))):
                     prefix = os.path.commonprefix([root_dir, project_dir])
                     return fullname[len(prefix) + 1:]
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to