Title: [117643] trunk/Tools
- Revision
- 117643
- Author
- [email protected]
- Date
- 2012-05-18 15:22:44 -0700 (Fri, 18 May 2012)
Log Message
scm.add() doesn't work properly with svn 1.7
https://bugs.webkit.org/show_bug.cgi?id=86779
Reviewed by Eric Seidel.
Re-land the change in r117526 with a fix to maintain
compatibility with SVN 1.4.4 (yay Leopard!); turns out
that "svn info foo" works correctly in 1.4.4 but
"svn info" from the directory "foo" doesn't if foo is
not part of a checkout. in_working_directory() and
value_from_svn_info() were using the arguments inconsistently,
leading to weird errors.
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM):
(SCM.in_working_directory):
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN):
(SVN.in_working_directory):
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (117642 => 117643)
--- trunk/Tools/ChangeLog 2012-05-18 22:15:15 UTC (rev 117642)
+++ trunk/Tools/ChangeLog 2012-05-18 22:22:44 UTC (rev 117643)
@@ -1,3 +1,25 @@
+2012-05-18 Dirk Pranke <[email protected]>
+
+ scm.add() doesn't work properly with svn 1.7
+ https://bugs.webkit.org/show_bug.cgi?id=86779
+
+ Reviewed by Eric Seidel.
+
+ Re-land the change in r117526 with a fix to maintain
+ compatibility with SVN 1.4.4 (yay Leopard!); turns out
+ that "svn info foo" works correctly in 1.4.4 but
+ "svn info" from the directory "foo" doesn't if foo is
+ not part of a checkout. in_working_directory() and
+ value_from_svn_info() were using the arguments inconsistently,
+ leading to weird errors.
+
+ * Scripts/webkitpy/common/checkout/scm/scm.py:
+ (SCM):
+ (SCM.in_working_directory):
+ * Scripts/webkitpy/common/checkout/scm/svn.py:
+ (SVN):
+ (SVN.in_working_directory):
+
2012-05-18 Levi Weintraub <[email protected]>
Unreviewed. Moving myself from committer to reviewer.
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py (117642 => 117643)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py 2012-05-18 22:15:15 UTC (rev 117642)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/scm.py 2012-05-18 22:22:44 UTC (rev 117643)
@@ -133,8 +133,8 @@
def _subclass_must_implement():
raise NotImplementedError("subclasses must implement")
- @staticmethod
- def in_working_directory(path):
+ @classmethod
+ def in_working_directory(cls, path):
SCM._subclass_must_implement()
def find_checkout_root(path):
Modified: trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py (117642 => 117643)
--- trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py 2012-05-18 22:15:15 UTC (rev 117642)
+++ trunk/Tools/Scripts/webkitpy/common/checkout/scm/svn.py 2012-05-18 22:22:44 UTC (rev 117643)
@@ -82,10 +82,17 @@
else:
self._patch_directories = patch_directories
- @staticmethod
- def in_working_directory(path):
- return os.path.isdir(os.path.join(path, '.svn'))
+ @classmethod
+ def in_working_directory(cls, path):
+ if os.path.isdir(os.path.join(path, '.svn')):
+ # This is a fast shortcut for svn info that is usually correct for SVN < 1.7,
+ # but doesn't work for SVN >= 1.7.
+ return True
+ svn_info_args = [cls.executable_name, 'info']
+ exit_code = Executive().run_command(svn_info_args, cwd=path, return_exit_code=True)
+ return (exit_code == 0)
+
def find_uuid(self, path):
if not self.in_working_directory(path):
return None
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes