ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r806933 - in /ant/sandbox/antlibs/compress/trunk/src: main/org/apache/ant/compress/conditions/ tests/antunit/
Date Sun, 23 Aug 2009 06:08:40 GMT
Author: bodewig
Date: Sun Aug 23 06:08:39 2009
New Revision: 806933

URL: http://svn.apache.org/viewvc?rev=806933&view=rev
Log:
specify permissions as octals in hasmode condition

Modified:
    ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/conditions/HasMode.java
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/arentry-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/conditions-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpioentry-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tarentry-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml
    ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zipentry-test.xml

Modified: ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/conditions/HasMode.java
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/conditions/HasMode.java?rev=806933&r1=806932&r2=806933&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/conditions/HasMode.java
(original)
+++ ant/sandbox/antlibs/compress/trunk/src/main/org/apache/ant/compress/conditions/HasMode.java
Sun Aug 23 06:08:39 2009
@@ -39,8 +39,8 @@
         resource = r;
     }
 
-    public void setMode(int i) {
-        mode = i;
+    public void setMode(String octalString) {
+        mode = Integer.parseInt(octalString, 8);
     }
 
     protected void validate() throws BuildException {

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml?rev=806933&r1=806932&r2=806933&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml Sun Aug 23 06:08:39 2009
@@ -32,7 +32,7 @@
       <attribute name="dateTime"/>
       <attribute name="uid" default="0"/>
       <attribute name="gid" default="0"/>
-      <attribute name="mode" default="33188"/>
+      <attribute name="mode" default="644"/>
       <sequential>
         <au:assertTrue>
           <cond:islastmodified datetime="@{dateTime}"
@@ -86,7 +86,7 @@
     </cmp:ar>
     <checkProperties dateTime="2001-11-19-15:34:20"
                      pattern="yyyy-MM-dd-HH:mm:ss"
-                     mode="33188"/>
+                     mode="644"/>
   </target>
 
   <target name="testAntlibZipFileSet" depends="setUp">
@@ -96,7 +96,7 @@
     </cmp:ar>
     <checkProperties dateTime="2001-11-19-15:34:20"
                      pattern="yyyy-MM-dd-HH:mm:ss"
-                     mode="33188"/>
+                     mode="644"/>
   </target>
 
   <target name="testCoreTarFileSet" depends="setUp">
@@ -104,7 +104,7 @@
       <tarfileset src="../resources/asf-logo.gif.tar"
                   includes="asf-logo.gif"/>
     </cmp:ar>
-    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
+    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="644"
                      uid="500" gid="500"/>
   </target>
 
@@ -113,7 +113,7 @@
       <cmp:tarfileset src="../resources/asf-logo.gif.tar"
                       includes="asf-logo.gif"/>
     </cmp:ar>
-    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
+    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="644"
                      uid="500" gid="500"/>
   </target>
 
@@ -122,7 +122,7 @@
       <cmp:arfileset src="../resources/asf-logo.gif.ar"
                      includes="asf-logo.gif"/>
     </cmp:ar>
-    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
+    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="644"
                      uid="1000" gid="1000"/>
   </target>
 
@@ -131,7 +131,7 @@
       <cmp:cpiofileset src="../resources/asf-logo.gif.cpio"
                        includes="asf-logo.gif"/>
     </cmp:ar>
-    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
+    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="644"
                      uid="1000" gid="1000"/>
   </target>
 

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/arentry-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/arentry-test.xml?rev=806933&r1=806932&r2=806933&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/arentry-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/arentry-test.xml Sun Aug 23 06:08:39
2009
@@ -62,7 +62,7 @@
       </cmp:hasgroupid>
     </au:assertTrue>
     <au:assertTrue>
-      <cmp:hasmode mode="33188">
+      <cmp:hasmode mode="644">
         <cmp:arentry name="asf-logo.gif">
           <file file="../resources/asf-logo.gif.ar"/>
         </cmp:arentry>

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/conditions-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/conditions-test.xml?rev=806933&r1=806932&r2=806933&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/conditions-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/conditions-test.xml Sun Aug 23 06:08:39
2009
@@ -32,24 +32,24 @@
       <cmp:tarfileset dir="${input}"
                       username="user" group="group"
                       uid="500" gid="600"
-                      filemode="644"
+                      filemode="664"
                       includes="asf-logo.gif"/>
     </cmp:tar>
     <cmp:ar destfile="${input}/test.ar">
       <cmp:arfileset dir="${input}"
                      uid="500" gid="600"
-                     filemode="644"
+                     filemode="664"
                      includes="asf-logo.gif"/>
     </cmp:ar>
     <cmp:cpio destfile="${input}/test.cpio">
       <cmp:cpiofileset dir="${input}"
                        uid="500" gid="600"
-                       filemode="644"
+                       filemode="664"
                        includes="asf-logo.gif"/>
     </cmp:cpio>
     <cmp:zip destfile="${input}/test.zip">
       <cmp:zipfileset dir="${input}"
-                      filemode="644"
+                      filemode="664"
                       includes="asf-logo.gif"/>
     </cmp:zip>
   </target>
@@ -96,7 +96,7 @@
 
   <target name="testCoreTarHasMode" depends="setUp">
     <au:assertTrue>
-      <cmp:hasmode mode="33188">
+      <cmp:hasmode mode="664">
         <tarentry name="asf-logo.gif">
           <file file="${input}/test.tar"/>
         </tarentry>
@@ -157,7 +157,7 @@
 
   <target name="testAntlibTarHasMode" depends="setUp">
     <au:assertTrue>
-      <cmp:hasmode mode="33188">
+      <cmp:hasmode mode="664">
         <cmp:tarentry name="asf-logo.gif">
           <file file="${input}/test.tar"/>
         </cmp:tarentry>
@@ -198,7 +198,7 @@
 
   <target name="testArHasMode" depends="setUp">
     <au:assertTrue>
-      <cmp:hasmode mode="33188">
+      <cmp:hasmode mode="664">
         <cmp:arentry name="asf-logo.gif">
           <file file="${input}/test.ar"/>
         </cmp:arentry>
@@ -239,7 +239,7 @@
 
   <target name="testCpioHasMode" depends="setUp">
     <au:assertTrue>
-      <cmp:hasmode mode="33188">
+      <cmp:hasmode mode="664">
         <cmp:cpioentry name="asf-logo.gif">
           <file file="${input}/test.cpio"/>
         </cmp:cpioentry>
@@ -260,7 +260,7 @@
 
   <target name="testCoreZipHasMode" depends="setUp">
     <au:assertTrue>
-      <cmp:hasmode mode="33188">
+      <cmp:hasmode mode="664">
         <zipentry name="asf-logo.gif">
           <file file="${input}/test.zip"/>
         </zipentry>
@@ -281,7 +281,7 @@
 
   <target name="testAntlibZipHasMode" depends="setUp">
     <au:assertTrue>
-      <cmp:hasmode mode="33188">
+      <cmp:hasmode mode="664">
         <cmp:zipentry name="asf-logo.gif">
           <file file="${input}/test.zip"/>
         </cmp:zipentry>

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml?rev=806933&r1=806932&r2=806933&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml Sun Aug 23 06:08:39
2009
@@ -32,7 +32,7 @@
       <attribute name="dateTime"/>
       <attribute name="uid" default="0"/>
       <attribute name="gid" default="0"/>
-      <attribute name="mode" default="33188"/>
+      <attribute name="mode" default="644"/>
       <sequential>
         <au:assertTrue>
           <cond:islastmodified datetime="@{dateTime}"
@@ -86,7 +86,7 @@
     </cmp:cpio>
     <checkProperties dateTime="2001-11-19-15:34:20"
                      pattern="yyyy-MM-dd-HH:mm:ss"
-                     mode="33188"/>
+                     mode="644"/>
   </target>
 
   <target name="testAntlibZipFileSet" depends="setUp">
@@ -96,7 +96,7 @@
     </cmp:cpio>
     <checkProperties dateTime="2001-11-19-15:34:20"
                      pattern="yyyy-MM-dd-HH:mm:ss"
-                     mode="33188"/>
+                     mode="644"/>
   </target>
 
   <target name="testCoreTarFileSet" depends="setUp">
@@ -104,7 +104,7 @@
       <tarfileset src="../resources/asf-logo.gif.tar"
                   includes="asf-logo.gif"/>
     </cmp:cpio>
-    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
+    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="644"
                      uid="500" gid="500"/>
   </target>
 
@@ -113,7 +113,7 @@
       <cmp:tarfileset src="../resources/asf-logo.gif.tar"
                       includes="asf-logo.gif"/>
     </cmp:cpio>
-    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
+    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="644"
                      uid="500" gid="500"/>
   </target>
 
@@ -122,7 +122,7 @@
       <cmp:arfileset src="../resources/asf-logo.gif.ar"
                      includes="asf-logo.gif"/>
     </cmp:cpio>
-    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
+    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="644"
                      uid="1000" gid="1000"/>
   </target>
 
@@ -131,7 +131,7 @@
       <cmp:cpiofileset src="../resources/asf-logo.gif.cpio"
                        includes="asf-logo.gif"/>
     </cmp:cpio>
-    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
+    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="644"
                      uid="1000" gid="1000"/>
   </target>
 

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpioentry-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpioentry-test.xml?rev=806933&r1=806932&r2=806933&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpioentry-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpioentry-test.xml Sun Aug 23 06:08:39
2009
@@ -62,7 +62,7 @@
       </cmp:hasgroupid>
     </au:assertTrue>
     <au:assertTrue>
-      <cmp:hasmode mode="33188">
+      <cmp:hasmode mode="644">
         <cmp:cpioentry name="asf-logo.gif">
           <file file="../resources/asf-logo.gif.cpio"/>
         </cmp:cpioentry>

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml?rev=806933&r1=806932&r2=806933&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml Sun Aug 23 06:08:39
2009
@@ -32,7 +32,7 @@
       <attribute name="dateTime"/>
       <attribute name="uid" default="0"/>
       <attribute name="gid" default="0"/>
-      <attribute name="mode" default="33188"/>
+      <attribute name="mode" default="644"/>
       <attribute name="user" default=""/>
       <attribute name="group" default=""/>
       <sequential>
@@ -102,7 +102,7 @@
     </cmp:tar>
     <checkProperties dateTime="2001-11-19-15:34:20"
                      pattern="yyyy-MM-dd-HH:mm:ss"
-                     mode="33188"/>
+                     mode="644"/>
   </target>
 
   <target name="testAntlibZipFileSet" depends="setUp">
@@ -112,7 +112,7 @@
     </cmp:tar>
     <checkProperties dateTime="2001-11-19-15:34:20"
                      pattern="yyyy-MM-dd-HH:mm:ss"
-                     mode="33188"/>
+                     mode="644"/>
   </target>
 
   <target name="testCoreTarFileSet" depends="setUp">
@@ -120,7 +120,7 @@
       <tarfileset src="../resources/asf-logo.gif.tar"
                   includes="asf-logo.gif"/>
     </cmp:tar>
-    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
+    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="644"
                      uid="500" gid="500" user="bodewig" group="bodewig"/>
   </target>
 
@@ -129,7 +129,7 @@
       <cmp:tarfileset src="../resources/asf-logo.gif.tar"
                       includes="asf-logo.gif"/>
     </cmp:tar>
-    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
+    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="644"
                      uid="500" gid="500" user="bodewig" group="bodewig"/>
   </target>
 
@@ -138,7 +138,7 @@
       <cmp:arfileset src="../resources/asf-logo.gif.ar"
                      includes="asf-logo.gif"/>
     </cmp:tar>
-    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
+    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="644"
                      uid="1000" gid="1000"/>
   </target>
 
@@ -147,7 +147,7 @@
       <cmp:cpiofileset src="../resources/asf-logo.gif.cpio"
                        includes="asf-logo.gif"/>
     </cmp:tar>
-    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="33188"
+    <checkProperties dateTime="2009-07-31-20:11:13 +0200" mode="644"
                      uid="1000" gid="1000"/>
   </target>
 

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tarentry-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tarentry-test.xml?rev=806933&r1=806932&r2=806933&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tarentry-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tarentry-test.xml Sun Aug 23 06:08:39
2009
@@ -93,7 +93,7 @@
       </cmp:hasgroupid>
     </au:assertTrue>
     <au:assertTrue>
-      <cmp:hasmode mode="33188">
+      <cmp:hasmode mode="644">
         <cmp:tarentry name="asf-logo.gif">
           <file file="../resources/asf-logo.gif.tar"/>
         </cmp:tarentry>

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml?rev=806933&r1=806932&r2=806933&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml Sun Aug 23 06:08:39
2009
@@ -30,7 +30,7 @@
     <macrodef name="checkProperties">
       <attribute name="pattern" default="yyyy-MM-dd-HH:mm:ss Z"/>
       <attribute name="dateTime"/>
-      <attribute name="mode" default="33188"/>
+      <attribute name="mode" default="644"/>
       <sequential>
         <au:assertTrue>
           <cond:islastmodified datetime="@{dateTime}"
@@ -70,7 +70,7 @@
     </cmp:zip>
     <checkProperties dateTime="2001-11-19-15:34:20"
                      pattern="yyyy-MM-dd-HH:mm:ss"
-                     mode="33188"/>
+                     mode="644"/>
   </target>
 
   <target name="testAntlibZipFileSet" depends="setUp">
@@ -80,7 +80,7 @@
     </cmp:zip>
     <checkProperties dateTime="2001-11-19-15:34:20"
                      pattern="yyyy-MM-dd-HH:mm:ss"
-                     mode="33188"/>
+                     mode="644"/>
   </target>
 
   <target name="testCoreTarFileSet" depends="setUp">
@@ -88,7 +88,7 @@
       <tarfileset src="../resources/asf-logo.gif.tar"
                   includes="asf-logo.gif"/>
     </cmp:zip>
-    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
+    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="644"
                      />
   </target>
 
@@ -97,7 +97,7 @@
       <cmp:tarfileset src="../resources/asf-logo.gif.tar"
                       includes="asf-logo.gif"/>
     </cmp:zip>
-    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="33188"
+    <checkProperties dateTime="2001-11-19-15:34:20 +0100" mode="644"
                      />
   </target>
 
@@ -106,7 +106,7 @@
       <cmp:arfileset src="../resources/asf-logo.gif.ar"
                      includes="asf-logo.gif"/>
     </cmp:zip>
-    <checkProperties dateTime="2009-07-31-20:11:12 +0200" mode="33188"
+    <checkProperties dateTime="2009-07-31-20:11:12 +0200" mode="644"
                      />
   </target>
 
@@ -115,7 +115,7 @@
       <cmp:cpiofileset src="../resources/asf-logo.gif.cpio"
                        includes="asf-logo.gif"/>
     </cmp:zip>
-    <checkProperties dateTime="2009-07-31-20:11:12 +0200" mode="33188"
+    <checkProperties dateTime="2009-07-31-20:11:12 +0200" mode="644"
                      />
   </target>
 

Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zipentry-test.xml
URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zipentry-test.xml?rev=806933&r1=806932&r2=806933&view=diff
==============================================================================
--- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zipentry-test.xml (original)
+++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zipentry-test.xml Sun Aug 23 06:08:39
2009
@@ -65,7 +65,7 @@
       </cond:islastmodified>
     </au:assertTrue>
     <au:assertTrue>
-      <cmp:hasmode mode="33188">
+      <cmp:hasmode mode="644">
         <cmp:zipentry name="asf-logo.gif">
           <file file="../resources/asf-logo.gif.zip"/>
         </cmp:zipentry>



Mime
View raw message