hadoop-zookeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akor...@apache.org
Subject svn commit: r686294 - in /hadoop/zookeeper/trunk: build.xml src/java/Changes.txt src/java/lib/svnant/ src/lastRevision.bat src/lastRevision.sh
Date Fri, 15 Aug 2008 18:00:17 GMT
Author: akornev
Date: Fri Aug 15 11:00:17 2008
New Revision: 686294

URL: http://svn.apache.org/viewvc?rev=686294&view=rev
Log:
[ZOOKEEPER-110] Removed dependency on svnant; using a shell script to extract the revision
number from SVN instead.

Added:
    hadoop/zookeeper/trunk/src/lastRevision.bat
    hadoop/zookeeper/trunk/src/lastRevision.sh   (with props)
Removed:
    hadoop/zookeeper/trunk/src/java/lib/svnant/
Modified:
    hadoop/zookeeper/trunk/build.xml
    hadoop/zookeeper/trunk/src/java/Changes.txt

Modified: hadoop/zookeeper/trunk/build.xml
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/build.xml?rev=686294&r1=686293&r2=686294&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/build.xml (original)
+++ hadoop/zookeeper/trunk/build.xml Fri Aug 15 11:00:17 2008
@@ -91,13 +91,6 @@
     <property name="test.cobertura.output.format" value="html" />
     <property name="coveragereport.dir" value="${build.dir}/cobertura" />
 
-    <path id="svnant.classpath">
-        <fileset dir="${lib.dir}/svnant">
-            <include name="**/*.jar"/>
-        </fileset>
-    </path>  
-    <typedef resource="org/tigris/subversion/svnant/svnantlib.xml" classpathref="svnant.classpath"
/>
-
     <!-- ====================================================== -->
     <!-- Generate and compile the Java files                    -->
     <!-- ====================================================== -->
@@ -161,12 +154,18 @@
     </target>
     
     <target name="svn-revision" unless="lastRevision">
-        <svn>
-            <status path="${src.dir}/java" lastChangedRevisionProperty="lastRevision"
/>
-        </svn>
         <mkdir dir="${revision.dir}" />
-        <echo file="${revision.dir}/${revision.properties}" 
-            message="lastRevision=${lastRevision}" />
+        <condition property="shell.name" value="cmd" else="sh">
+      	    <os family="windows"/>
+        </condition>
+        <condition property="revision.cmd.line" 
+        	value="/c ${src.dir}\lastRevision.bat" else="${src.dir}/lastRevision.sh">
+      	    <os family="windows"/>
+        </condition>
+        <exec executable="${shell.name}">
+           <arg line="${revision.cmd.line} ${revision.dir}${file.separator}${revision.properties}"/>
+        </exec>
+        <property file="${revision.dir}/${revision.properties}" />
     </target>
     
     <target name="version-info" depends="ver-gen,svn-revision">

Modified: hadoop/zookeeper/trunk/src/java/Changes.txt
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/java/Changes.txt?rev=686294&r1=686293&r2=686294&view=diff
==============================================================================
--- hadoop/zookeeper/trunk/src/java/Changes.txt (original)
+++ hadoop/zookeeper/trunk/src/java/Changes.txt Fri Aug 15 11:00:17 2008
@@ -1,6 +1,8 @@
 Trunk:
   BUGFIXES:
   
+  ZOOKEEPER-110. Build script relies on svnant, which is not compatible with subversion 1.5
working copies (Jakob Homan)
+ 
   ZOOKEEPER-105. Catch Zookeeper exceptions and print on the stderr. (Anthony Urso via Mahadev)
 
   ZOOKEEPER-108. Fix sync operation reordering on a Quorum. (Flavio Paiva Junqueira via Mahadev)

Added: hadoop/zookeeper/trunk/src/lastRevision.bat
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/lastRevision.bat?rev=686294&view=auto
==============================================================================
--- hadoop/zookeeper/trunk/src/lastRevision.bat (added)
+++ hadoop/zookeeper/trunk/src/lastRevision.bat Fri Aug 15 11:00:17 2008
@@ -0,0 +1,23 @@
+echo off
+rem Licensed to the Apache Software Foundation (ASF) under one
+rem or more contributor license agreements.  See the NOTICE file
+rem distributed with this work for additional information
+rem regarding copyright ownership.  The ASF licenses this file
+rem to you under the Apache License, Version 2.0 (the
+rem "License"); you may not use this file except in compliance
+rem with the License.  You may obtain a copy of the License at
+rem
+rem     http://www.apache.org/licenses/LICENSE-2.0
+rem
+rem Unless required by applicable law or agreed to in writing, software
+rem distributed under the License is distributed on an "AS IS" BASIS,
+rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+rem See the License for the specific language governing permissions and
+rem limitations under the License.
+
+rem Find the current revision, store it in a file, for DOS
+svn info | findstr Revision > %1
+
+For /F "tokens=1,2 delims= " %%a In (%1) Do (
+	echo lastRevision=%%b> %1
+)

Added: hadoop/zookeeper/trunk/src/lastRevision.sh
URL: http://svn.apache.org/viewvc/hadoop/zookeeper/trunk/src/lastRevision.sh?rev=686294&view=auto
==============================================================================
--- hadoop/zookeeper/trunk/src/lastRevision.sh (added)
+++ hadoop/zookeeper/trunk/src/lastRevision.sh Fri Aug 15 11:00:17 2008
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Find the current revision, store it in a file
+FILE=$1
+LASTREV=`svn info | grep '^Revision' | sed -e 's/Revision: *//'`
+
+echo "lastRevision=${LASTREV}" > $FILE

Propchange: hadoop/zookeeper/trunk/src/lastRevision.sh
------------------------------------------------------------------------------
    svn:executable = *



Mime
View raw message