On Tue, 2008-01-15 at 09:30 -0600, Keith Pierce wrote: [...] > I tried to apply your latest reports patch in Eclipse to base revision > 12252, but got many errors. Eclipse's patch review screen showed a > total of 33 unmatched hunks spread over 15 files. [...]
I'm also having trouble applying the patch. Before I go into the details of what I'm seeing, I'd like to humbly suggest an alternative strategy for creating the patch: Create a "clean" working copy of the mifos source tree (let's say in the directory "MifosClean") by performing a svn checkout. Use the command-line "diff" utility to recursively compare this clean source tree and the source tree containing your changes. For example: diff -ruN -x .svn -x bin -x build MifosClean MifosModifiedTree -r = recurse -u = unified diff format -N = treat absent files as empty -x PATTERN = exclude files matching this pattern (you can add more -x PATTERN options if necessary) This should hopefully produce a patch that we can apply. It looks to me like the patch was created with svk, not svn (just search the patch for SVK and you'll see what I mean). About the end-of-line strangeness... I'm going to really go out on a limb and guess that the patch creator is using svk on Cygwin. I was able apply the patch using Eclipse. I just ignored the errors. However, compile errors followed. Using the "patch" command line utility on my Ubuntu box *mostly* worked; there were still failures: ... patching file src/org/mifos/application/collectionsheet/business/CollSheetCustBO.hbm.xml Hunk #1 FAILED at 103. 1 out of 1 hunk FAILED -- saving rejects to file src/org/mifos/application/collectionsheet/business/CollSheetCustBO.hbm.xml.rej (Stripping trailing CRs from patch.) patching file src/org/mifos/application/collectionsheet/business/CollectionSheetBO.hbm.xml Hunk #1 FAILED at 12. 1 out of 1 hunk FAILED -- saving rejects to file src/org/mifos/application/collectionsheet/business/CollectionSheetBO.hbm.xml.rej (Stripping trailing CRs from patch.) patching file src/org/mifos/config/applicationContext.xml Hunk #3 FAILED at 76. 1 out of 3 hunks FAILED -- saving rejects to file src/org/mifos/config/applicationContext.xml.rej (Stripping trailing CRs from patch.) ... The following reject files were seen after the patch: ./src/org/mifos/application/collectionsheet/business/CollectionSheetBO.hbm.xml.rej ./src/org/mifos/application/collectionsheet/business/CollSheetCustBO.hbm.xml.rej ./src/org/mifos/config/applicationContext.xml.rej Based on the content of the reject files, it looks like end-of-line strangeness may account for the rejects. For instance (this is from CollectionSheetBO.hbm.xml.rej): ... </hibernate-mapping>^M--- 12,40 ---- ... the 12,40 is a "diff" directive, but it is somehow clumped together with a line of XML code. Yuck. Also note that "patch" spit out a bunch of "stripping trailing CRs messages": ... patching file test/org/mifos/framework/components/batchjobs/MifosSchedulerTest.java (Stripping trailing CRs from patch.) patching file test/org/mifos/framework/util/helpers/MockObjectHelpers.java (Stripping trailing CRs from patch.) ... -- Adam Monsen ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
