For our project we use cvs and we want share changes using patch created using eclipse with configuration in image:
The patch is like this:
### Eclipse Workspace Patch 1.0
#P project2
Index: testFile2.txt
===================================================================
RCS file: testFile2.txt
diff -N testFile2.txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testFile2.txt 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,5 @@
+
+xxxxxx
#P project1
Index: testFile1.txt
===================================================================
RCS file: testFile1.txt
diff -N testFile1.txt
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ testFile1.txt 1 Jan 1970 00:00:00 -0000
@@ -0,0 +1,5 @@
+
+yyyyyy
Is there a command/library allows to apply this patch without eclipse? I try 'patch' command but seems doesn't supports this patch format.
The problem has no simple solution because the format of Multi-project is not standard and only eclipse know how to apply that format. Standard patch format doesn't know command:
#P project1
My workaround is:
apply patch using ant task (wrapping patch command)
<target name="applyPatch">
<echo message="Apply patch:${patchFileName}"/>
<echo message="workspace.home:${workspace.home}"/>
<sequential>
<local name="projectName" />
<basename property="projectName" file="${patchFileName}" suffix=".patch" />
<echo message="${projectName}"/>
<exec executable="patch">
<arg value="-d"/>
<arg value="${workspace.home}/${projectName}"/>
<arg value="-i"/>
<arg value="${patchFileName}"/>
<arg value="-p" />
<arg value="0" />
<arg value="-u" />
<arg value="-N" />
</exec>
</sequential>
</target>