geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r504000 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/Template.groovy
Date Tue, 06 Feb 2007 05:53:02 GMT
Author: jdillon
Date: Mon Feb  5 21:53:01 2007
New Revision: 504000

URL: http://svn.apache.org/viewvc?view=rev&rev=504000
Log:
Fail if we try to re-render a page thats bad

Modified:
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/Template.groovy

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/Template.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/Template.groovy?view=diff&rev=504000&r1=503999&r2=504000
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/Template.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/util/Template.groovy
Mon Feb  5 21:53:01 2007
@@ -68,12 +68,10 @@
         assert file
         assert file.parentFile.exists()
         
-        if (file.exists()) {
-            log.warn "Re-rendering to: $file"
-        }
-        else {
-            log.debug "Rendering to: $file"
-        }
+        // Fail if we are overriting something
+        assert !file.exists()
+        
+        log.debug "Rendering to: $file"
         
         def writer = file.newWriter()
         try {



Mime
View raw message