geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
Subject svn commit: r543000 - /geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy
Date Thu, 31 May 2007 00:42:36 GMT
Author: jdillon
Date: Wed May 30 17:42:35 2007
New Revision: 543000

URL: http://svn.apache.org/viewvc?view=rev&rev=543000
Log:
Add is latest support

Modified:
    geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy

Modified: geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy
URL: http://svn.apache.org/viewvc/geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy?view=diff&rev=543000&r1=542999&r2=543000
==============================================================================
--- geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy
(original)
+++ geronimo/sandbox/build-support/libraries/system/1/groovy/gbuild/system/library/codestation/LibraryImpl.groovy
Wed May 30 17:42:35 2007
@@ -92,6 +92,13 @@
                 log.debug("[${i++}] $it")
             }
         }
+        
+        // Save the state of the library
+        def props = new Properties()
+        props['buildLifeId'] = _buildLifeId
+        
+        def statusFile = new File(baseDir, '.library-info.properties')
+        props.store(statusFile.newOutputStream(), null)
     }
     
     boolean isLatest() {
@@ -99,14 +106,28 @@
         
         assert exists()
         
-        //
-        // TODO
-        //
+        def statusFile = new File(baseDir, '.library-info.properties')
+        if (!statusFile.exists()) {
+            return false
+        }
+        
+        def props = new Properties()
+        props.load(statusFile.newInputStream())
+        
+        CodestationClient client = new CodestationClient(serverURL, true)
+        client.debug = true
+        
+        def doc = lookupProject(client)
+        def buildLifeId = client.extractBuildlifeId(doc)
+        
+        log.info("Have buildLifeId: ${props['buildLifeId']}, latest is: ${buildLifeId}")
+        
+        return props['buildLifeId'] == buildLifeId
     }
     
     void update() {
         //
-        // TODO
+        // TODO: Delete the current tree, checkout again
         //
     }
     



Mime
View raw message