jhbuild r2265 - in trunk: . jhbuild/buildbot



Author: fpeters
Date: Sat Aug 16 21:23:48 2008
New Revision: 2265
URL: http://svn.gnome.org/viewvc/jhbuild?rev=2265&view=rev

Log:
* jhbuild/buildbot/scheduler.py: mark updates limited to /po/ files as
unimportant as it is unlikely they would break the build.



Modified:
   trunk/ChangeLog
   trunk/jhbuild/buildbot/scheduler.py

Modified: trunk/jhbuild/buildbot/scheduler.py
==============================================================================
--- trunk/jhbuild/buildbot/scheduler.py	(original)
+++ trunk/jhbuild/buildbot/scheduler.py	Sat Aug 16 21:23:48 2008
@@ -35,7 +35,6 @@
 
 
 class ChangeNotification:
-    fileIsImportant = None
     treeStableTimer = 180
 
     def __init__(self):
@@ -44,6 +43,17 @@
         self.nextBuildTime = None
         self.timer = None
 
+    def changeIsImportant(self, change):
+        if not change.files:
+            # strange, better be on the safe side
+            return True
+        non_po_files = [x for x in change.files if not '/po/' in x]
+        if non_po_files:
+            return True
+        # changes are limited to translations, it is unlikely it would break
+        # the build, mark them as unimportant.
+        return False
+
     def addChange(self, change):
         log.msg('adding a change')
         if change.project != self.project:
@@ -51,9 +61,7 @@
             return
         if change.branch != self.branch:
             return
-        if not self.fileIsImportant:
-            self.addImportantChange(change)
-        elif self.fileIsImportant(change):
+        if self.changeIsImportant(change):
             self.addImportantChange(change)
         else:
             self.addUnimportantChange(change)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]