newcommitbot (WKR) requires a subversion checkout
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Apr 2013 22:02:17 +0000 (22:02 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 9 Apr 2013 22:02:17 +0000 (22:02 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114309

Reviewed by Benjamin Poulain.

Directly talk to the subversion server instead of relying on a local checkout.
This allows us to run WKR off of a git clone.

* Scripts/webkitpy/tool/commands/newcommitbot.py:
(NewCommitBot.next_work_item):
(NewCommitBot.process_work_item):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@148055 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Tools/ChangeLog
Tools/Scripts/webkitpy/tool/commands/newcommitbot.py

index f594a13331c59c486274eb384d49a5d71435b89a..382277c84616b9029a72fc1e15556ac3275b38cc 100644 (file)
@@ -1,3 +1,17 @@
+2013-04-09  Ryosuke Niwa  <rniwa@webkit.org>
+
+        newcommitbot (WKR) requires a subversion checkout
+        https://bugs.webkit.org/show_bug.cgi?id=114309
+
+        Reviewed by Benjamin Poulain.
+
+        Directly talk to the subversion server instead of relying on a local checkout.
+        This allows us to run WKR off of a git clone.
+
+        * Scripts/webkitpy/tool/commands/newcommitbot.py:
+        (NewCommitBot.next_work_item):
+        (NewCommitBot.process_work_item):
+
 2013-04-09  Ryosuke Niwa  <rniwa@webkit.org>
 
         webkitbot refers to sheriffbot in help
index 87cf4459a316af9655bb82c8b5314aaf7180d6cc..2aba1900331a87eae01687edea6499b46685a420 100644 (file)
@@ -75,15 +75,13 @@ class NewCommitBot(AbstractQueue, StepSequenceErrorHandler):
 
         _log.info('Last SVN revision: %d' % self._last_svn_revision)
 
-        if self._tool.scm().executable_name != 'svn':
-            _log.error('This bot only works inside a SVN checkout')
-
         for revision in range(self._last_svn_revision + 1, self._last_svn_revision + self._maximum_number_of_revisions_to_avoid_spamming_irc):
             try:
-                commit_log = self._tool.scm().svn_commit_log(revision)
+                commit_log = self._tool.executive.run_command(['svn', 'log', 'https://svn.webkit.org/repository/webkit/trunk', '--non-interactive', '--revision',
+                    self._tool.scm().strip_r_from_svn_revision(revision)])
             except ScriptError:
                 break
-            if self._is_empty_log(commit_log):
+            if self._is_empty_log(commit_log) or commit_log.find('No such revision') >= 0:
                 continue
             _log.info('Found revision %d' % revision)
             self._last_svn_revision = revision
@@ -95,10 +93,6 @@ class NewCommitBot(AbstractQueue, StepSequenceErrorHandler):
     def process_work_item(self, failure_map):
         return True
 
-    def _update_checkout(self):
-        tool = self._tool
-        tool.executive.run_and_throw_if_fail(tool.deprecated_port().update_webkit_command(), quiet=True, cwd=tool.scm().checkout_root)
-
     _patch_by_regex = re.compile(r'^Patch\s+by\s+(?P<author>.+?)\s+on(\s+\d{4}-\d{2}-\d{2})?\n?', re.MULTILINE | re.IGNORECASE)
     _rollout_regex = re.compile(r'(rolling out|reverting) (?P<revisions>r?\d+((,\s*|,?\s*and\s+)?r?\d+)*)\.?\s*', re.MULTILINE | re.IGNORECASE)
     _requested_by_regex = re.compile(r'^\"?(?P<reason>.+?)\"? \(Requested\s+by\s+(?P<author>.+?)\s+on\s+#webkit\)\.', re.MULTILINE | re.IGNORECASE)