[Checkins] SVN: z3c.recipe.usercrontab/trunk/ Added extra blank line in front of "BUILDOUT=..." variable to allow for

Reinout van Rees reinout at vanrees.org
Mon Jun 15 09:52:36 EDT 2009


Log message for revision 101008:
  Added extra blank line in front of "BUILDOUT=..." variable to allow for
  better readability
  

Changed:
  U   z3c.recipe.usercrontab/trunk/CHANGES.txt
  U   z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/README.txt
  U   z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py

-=-
Modified: z3c.recipe.usercrontab/trunk/CHANGES.txt
===================================================================
--- z3c.recipe.usercrontab/trunk/CHANGES.txt	2009-06-15 13:51:07 UTC (rev 101007)
+++ z3c.recipe.usercrontab/trunk/CHANGES.txt	2009-06-15 13:52:36 UTC (rev 101008)
@@ -1,32 +1,38 @@
 z3c.recipe.usercrontab changes
-******************************
+==============================
 
 0.5 (unreleased)
-================
+----------------
 
-* ...
+* Added extra blank line in front of "BUILDOUT=..." variable to allow for
+  better readability.  [reinout]
 
+* Added "BUILDOUT=...." as environment variable for every set of crontab lines
+  handled by one buildout.  This makes it much easier to spot what got added
+  by which buildout (in case you have multiple) or which buildout at all (if
+  you have no clue where the buildout can be found).  [reinout]
+
 0.4 (2008-02-25)
-================
+----------------
 
 * Fix bug where UserCrontabs with empty readcrontab and writecrontab
   constructor arguments where broken
 
 0.3 (2008-02-23)
-================
+----------------
 
 * Renamed to z3c.recipe.usercrontab
 * Add an option to change the command used to read and write crontabs
 * Improved tests to not modify the real crontab
 
 0.2 (2008-01-12)
-================
+----------------
 
 * Warn if an entry cannot be removed in buildout uninstall
 * Break if multiple entries would be removed in buildout uninstall
 * Have del_entry return the number of removed
 
 0.1 (2008-01-12)
-================
+----------------
 
 * Initial release.

Modified: z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/README.txt
===================================================================
--- z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/README.txt	2009-06-15 13:51:07 UTC (rev 101007)
+++ z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/README.txt	2009-06-15 13:52:36 UTC (rev 101008)
@@ -253,10 +253,12 @@
     >>> 'WARNING=The entries below were generated by buildout, do not modify' in c.crontab
     True
 
-The entries are grouped per buildout:
+The entries are grouped per buildout (with a blank line in front of every
+BUILDOUT line for better readability):
 
     >>> print c # doctest: +ELLIPSIS +NORMALIZE_WHITESPACE
     WARNING=The entries below were generated by buildout, do not modify
+    <BLANKLINE>
     BUILDOUT=.../sample-buildout
     # @reboot   echo nothing happens
 

Modified: z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py
===================================================================
--- z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py	2009-06-15 13:51:07 UTC (rev 101007)
+++ z3c.recipe.usercrontab/trunk/src/z3c/recipe/usercrontab/usercrontab.py	2009-06-15 13:52:36 UTC (rev 101008)
@@ -96,6 +96,9 @@
     def write_crontab(self):
         fd = os.popen(self.writecrontab, "w")
         for l in self.crontab:
+            if l.startswith('BUILDOUT='):
+                # empty line for better between-buildout visual separation.
+                fd.write('\n')
             fd.write("%s\n" % l)
         fd.close()
 



More information about the Checkins mailing list