+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
_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
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)