> -----Original Message----- > From: gmcdon...@apache.org [mailto:gmcdon...@apache.org] > Sent: Thursday, 15 January 2009 10:05 PM > To: s...@forrest.apache.org > Subject: svn commit: r734679 - > /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/loc > ationmap.xml > > Author: gmcdonald > Date: Thu Jan 15 04:04:35 2009 > New Revision: 734679 > > URL: http://svn.apache.org/viewvc?rev=734679&view=rev > Log: > Whitespace changes only. Used xmlformat
So, after 3+ years of seeing Davids whitespace commits mention xmlformat, I decided to download and try it. I used it in Cygwin shell, though I guess if perl is in the windows path ok it should work on DOS prompt too. I configured a new config file just over-riding the indent to 2 space. I left everything else at defaults. Running it on this one file for testing I was initially disspointed. $ xmlformat.pl --config-file=/path/to/forrest.conf -I -b .bak locationmap.xml It correctly removed whitespace and indented as intended on the affected lines. However, being on windows there is usually a snag, all of the lines that were not involved in the whitespace cleanup ended up with the infamous ^M windows line endings on them, that's not good. So, a quick reminder of what perl can do for me solved it nicely. after running the above, immediately follow it up with :- $ perl -p -i -e 's/\r//g' locationmap.xml That gets rid of all windows line endings. A quick 'svn diff' shows now that only the whitespace affected lines have changed, now I can commit. Obviously this comes into its own when performed on multiple files so in both commands above 'locationmap.xml can be replaced with *.xml or whatever your cleaning up. HTH David, if you have time, I'm sure you've tweaked your xmlformat file nicely for use within forrest, is there more I need to do to my config file other than alter the indenting? (so I don't come unstuck in larger more complicated files) Thanks Gav... > > Modified: > > forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/loca > tionmap.xml > > Modified: > forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/loca > tionmap.xml > URL: > http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.f > orrest.plugin.output.OOo/locationmap.xml?rev=734679&r1=734678&r2=734679&vi > ew=diff > ========================================================================== > ==== > --- > forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/loca > tionmap.xml (original) > +++ > forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/loca > tionmap.xml Thu Jan 15 04:04:35 2009 > @@ -28,11 +28,11 @@ > </selectors> > </components> > <locator> > - <match pattern="odt.transform.*.*"> > - <select> > - <location src="resources/stylesheets/{1}-to- > {2}.xsl"/> > - <location > src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.OOo/resour > ces/stylesheets/{1}-to-{2}.xsl"/> > - </select> > + <match pattern="odt.transform.*.*"> > + <select> > + <location src="resources/stylesheets/{1}-to-{2}.xsl"/> > + <location > src="{forrest:forrest.plugins}/org.apache.forrest.plugin.output.OOo/resour > ces/stylesheets/{1}-to-{2}.xsl"/> > + </select> > </match> > </locator> > </locationmap>