https://bugs.webkit.org/show_bug.cgi?id=86779
Reviewed by Ojan Vafai.
The code relied on '.svn' directories being present
in order to tell if a directory had already been added to the
repository; this is no longer true in SVN 1.7.
* Scripts/webkitpy/common/checkout/scm/scm.py:
(SCM):
(SCM.in_working_directory):
* Scripts/webkitpy/common/checkout/scm/svn.py:
(SVN):
(SVN.in_working_directory):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117526
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-05-17 Dirk Pranke <dpranke@chromium.org>
+
+ scm.add() doesn't work properly with svn 1.7
+ https://bugs.webkit.org/show_bug.cgi?id=86779
+
+ Reviewed by Ojan Vafai.
+
+ The code relied on '.svn' directories being present
+ in order to tell if a directory had already been added to the
+ repository; this is no longer true in SVN 1.7.
+
+ * 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-17 Jon Lee <jonlee@apple.com>
Update Apple buildbots to prioritize latest changelists
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):
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', path]
+ exit_code = Executive().run_command(svn_info_args, return_exit_code=True)
+ return (exit_code == 0)
def find_uuid(self, path):
if not self.in_working_directory(path):