changeset 231:4a9cf87d443f

Allow the build queue for a configuration to be limited to a range between `min_rev` and `max_rev`.
author cmlenz
date Wed, 28 Sep 2005 22:54:00 +0000
parents c7ff953ebb07
children b6e4896dc026
files bitten/queue.py bitten/trac_ext/templates/bitten_config.cs
diffstat 2 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/bitten/queue.py
+++ b/bitten/queue.py
@@ -35,6 +35,12 @@
         if path != repos.normalize_path(config.path):
             break
 
+        # Stay within the limits of the build config
+        if config.min_rev and repos.rev_older_than(rev, config.min_rev):
+            break
+        if config.max_rev and repos.rev_older_than(config.max_rev, rev):
+            continue
+
         # Make sure the repository directory isn't empty at this
         # revision
         old_node = repos.get_node(path, rev)
--- a/bitten/trac_ext/templates/bitten_config.cs
+++ b/bitten/trac_ext/templates/bitten_config.cs
@@ -75,9 +75,16 @@
      <legend>Repository Mapping</legend>
      <table summary=""><tr>
       <th><label for="path">Path:</label></th>
-      <td><input type="text" name="path" size="48" value="<?cs
+      <td colspan="3"><input type="text" name="path" size="48" value="<?cs
         var:config.path ?>" /></td>
-     </tr></table>
+     </tr><tr>
+      <th><label for="min_rev">Oldest revision:</label></th>
+      <td><input type="text" name="min_rev" size="8" value="<?cs
+        var:config.min_rev ?>" /></td>
+      <th><label for="min_rev">Youngest revision:</label></th>
+      <td><input type="text" name="max_rev" size="8" value="<?cs
+        var:config.max_rev ?>" /></td>
+     </table>
     </fieldset>
     <div class="buttons">
      <input type="hidden" name="action" value="<?cs
Copyright (C) 2012-2017 Edgewall Software