WKR gets stuck when there are many merges
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2013 20:13:45 +0000 (20:13 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 15 Apr 2013 20:13:45 +0000 (20:13 +0000)
https://bugs.webkit.org/show_bug.cgi?id=114632

Reviewed by Andreas Kling.

Move the last revision forward when it exists in a branch.
Otherwise, we'll be stuck looping over revisions made to merge patches.

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

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

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

index 1f421db5adaf5f390d65015d26214e28c5cee64c..f77c080483a5943bcee48050fa7f4fbf491b8800 100644 (file)
@@ -1,3 +1,16 @@
+2013-04-15  Ryosuke Niwa  <rniwa@webkit.org>
+
+        WKR gets stuck when there are many merges
+        https://bugs.webkit.org/show_bug.cgi?id=114632
+
+        Reviewed by Andreas Kling.
+
+        Move the last revision forward when it exists in a branch.
+        Otherwise, we'll be stuck looping over revisions made to merge patches.
+
+        * Scripts/webkitpy/tool/commands/newcommitbot.py:
+        (NewCommitBot.next_work_item):
+
 2013-04-15  Gustavo Noronha Silva  <gns@gnome.org>
 
         [GTK] Missing a few packages for building on stock Fedora
index ceb5dd18a98e6341119ed3d36a77a82b64e5dd0d..b65b0c331f307606c544a63fdf3b5f75a7b92668 100644 (file)
@@ -72,16 +72,24 @@ class NewCommitBot(AbstractQueue, StepSequenceErrorHandler):
 
         _log.info('Last SVN revision: %d' % self._last_svn_revision)
 
-        for revision in range(self._last_svn_revision + 1, self._last_svn_revision + self._maximum_number_of_revisions_to_avoid_spamming_irc):
+        count = 0
+        while count < self._maximum_number_of_revisions_to_avoid_spamming_irc:
+            new_revision = self._last_svn_revision + 1
             try:
                 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)])
+                    self._tool.scm().strip_r_from_svn_revision(new_revision)])
             except ScriptError:
                 break
-            if self._is_empty_log(commit_log) or commit_log.find('No such revision') >= 0:
+
+            if commit_log.find('No such revision') >= 0:
+                continue
+
+            self._last_svn_revision = new_revision
+            if self._is_empty_log(commit_log):
                 continue
-            _log.info('Found revision %d' % revision)
-            self._last_svn_revision = revision
+
+            count += 1
+            _log.info('Found revision %d' % new_revision)
             self._tool.irc().post(self._summarize_commit_log(commit_log).encode('utf-8'))
 
     def _is_empty_log(self, commit_log):