svn commit: r1084215 - /ofbiz/trunk/framework/resources/templates/build.xml

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1084215 - /ofbiz/trunk/framework/resources/templates/build.xml

jleroux@apache.org
Author: jleroux
Date: Tue Mar 22 15:24:59 2011
New Revision: 1084215

URL: http://svn.apache.org/viewvc?rev=1084215&view=rev
Log:
Add a root.patch and allow to work correctly on Windows machines where patch.exe does not handle mixed EOLs (contrary to patch on Linux). This is due to SVN mixing EOLs when creating patches.

Modified:
    ofbiz/trunk/framework/resources/templates/build.xml

Modified: ofbiz/trunk/framework/resources/templates/build.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/resources/templates/build.xml?rev=1084215&r1=1084214&r2=1084215&view=diff
==============================================================================
--- ofbiz/trunk/framework/resources/templates/build.xml (original)
+++ ofbiz/trunk/framework/resources/templates/build.xml Tue Mar 22 15:24:59 2011
@@ -38,6 +38,10 @@
     <!-- ================================================================= -->
 
     <target name="create-ofbiz-patches" description="Creates patch for framework, application, specialpurpose components">
+        <exec executable="svn" output="patches/root.patch" dir="${ofbiz.home.dir}">
+            <arg value="diff"/>
+            <arg value="--depth=files"/>
+        </exec>
         <exec executable="svn" output="patches/framework.patch" dir="${ofbiz.home.dir}">
             <arg value="diff"/>
             <arg value="framework"/>
@@ -50,11 +54,18 @@
             <arg value="diff"/>
             <arg value="specialpurpose"/>
         </exec>
+        <!-- this allow to work correctly on Windows machines without issues on Linux machines -->
+        <fixcrlf srcdir="patches" includes="**/*.patch" eol="crlf" />
     </target>
 
     <target name="revert-ofbiz-patches" description="Remove any local change in the files or any previously applied local patch.">
         <exec executable="svn" dir="${ofbiz.home.dir}">
             <arg value="revert"/>
+          <arg value="--depth=files"/>
+            <arg value="${ofbiz.home.dir}"/>
+        </exec>
+        <exec executable="svn" dir="${ofbiz.home.dir}">
+            <arg value="revert"/>
             <arg value="-R"/>
             <arg value="framework"/>
         </exec>
@@ -83,6 +94,7 @@
                 </or>
             </condition>
         </fail>
+        <patch strip="0" patchfile="patches/root.patch" dir="${ofbiz.home.dir}"/>
         <patch strip="0" patchfile="patches/framework.patch" dir="${ofbiz.home.dir}"/>
         <patch strip="0" patchfile="patches/applications.patch" dir="${ofbiz.home.dir}"/>
         <patch strip="0" patchfile="patches/specialpurpose.patch" dir="${ofbiz.home.dir}"/>
@@ -104,4 +116,4 @@
         <antcall target="revert-ofbiz-patches"/>
         <antcall target="apply-ofbiz-patches"/>
     </target>
-</project>
\ No newline at end of file
+</project>