You are viewing a plain text version of this content. The canonical link for it is here.
Posted to svn@forrest.apache.org by gm...@apache.org on 2009/01/15 13:04:36 UTC

svn commit: r734679 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/locationmap.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

Modified:
    forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/locationmap.xml

Modified: forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/locationmap.xml
URL: http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/locationmap.xml?rev=734679&r1=734678&r2=734679&view=diff
==============================================================================
--- forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/locationmap.xml (original)
+++ forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/locationmap.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/resources/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/resources/stylesheets/{1}-to-{2}.xsl"/>
+      </select>
     </match>
   </locator>
 </locationmap>



Re: xmlformat (was: svn commit: r734679)

Posted by David Crossley <cr...@apache.org>.
David Crossley wrote:
> Gavin wrote:
> > > 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.
> 
> That was probably only from a once-off job.
> But sure, there is heaps of past discussion about 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)
> 
> Please search, there is documentation and Jira issues about this.
> 
> After massive effort, i got something working nicely using xmlformat
> and committed our configuration file for it. See below.
> 
> There is also discussion about a batch job which is run just
> before a release. That is probably noted in the "How to Release"
> instructions.
> No, just checked, there is only a brief mention about line-endings.
> We need to look at what i did just before the 0.8 release. I tried
> to talk on dev@ about what i was doing during the release process,
> so as to document it for next time.

Or the commit messages around that time.

> Doing a batch job at any other time is dangerous. See mail
> discussions, but we need to be careful to co-ordinate
> with all developers beforehand, otherwise potential for many
> svn conflicts for them. That is why it is only done just
> before release - people should have then contributed any
> outstanding changes.
> 
> There is also an Ant task to do xmlformat on a single file.

See $FORREST_HOME/main/build.xml and search for "xmlformat":

There are internal comment notes at the "xmlformat"
and "xmlformat-single" tasks.

-David

> It all uses our our config file and stuff at $FORREST_HOME/etc/
> 
> I only developed it for UNIX-like systems, so you might have
> other issues on Windows. I would be wary about using Windows
> for such tasks, but maybe that is just me.
> 
> There is also documentation somewhere about the general tasks
> of keeping "line endings" and "svn properties" consistent.
> I will try to find time to do those jobs one more time and
> commit my changes to the "exclude" configuration files.
> They should be done before using xmlformat.
> 
> -David

Re: xmlformat (was: svn commit: r734679)

Posted by David Crossley <cr...@apache.org>.
Gavin wrote:
> > 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.

That was probably only from a once-off job.
But sure, there is heaps of past discussion about 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)

Please search, there is documentation and Jira issues about this.

After massive effort, i got something working nicely using xmlformat
and committed our configuration file for it. See below.

There is also discussion about a batch job which is run just
before a release. That is probably noted in the "How to Release"
instructions.
No, just checked, there is only a brief mention about line-endings.
We need to look at what i did just before the 0.8 release. I tried
to talk on dev@ about what i was doing during the release process,
so as to document it for next time.

Doing a batch job at any other time is dangerous. See mail
discussions, but we need to be careful to co-ordinate
with all developers beforehand, otherwise potential for many
svn conflicts for them. That is why it is only done just
before release - people should have then contributed any
outstanding changes.

There is also an Ant task to do xmlformat on a single file.

It all uses our our config file and stuff at $FORREST_HOME/etc/

I only developed it for UNIX-like systems, so you might have
other issues on Windows. I would be wary about using Windows
for such tasks, but maybe that is just me.

There is also documentation somewhere about the general tasks
of keeping "line endings" and "svn properties" consistent.
I will try to find time to do those jobs one more time and
commit my changes to the "exclude" configuration files.
They should be done before using xmlformat.

-David

xmlformat (was RE: svn commit: r734679 - /forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.output.OOo/locationmap.xml)

Posted by Gavin <ga...@16degrees.com.au>.

> -----Original Message-----
> From: gmcdonald@apache.org [mailto:gmcdonald@apache.org]
> Sent: Thursday, 15 January 2009 10:05 PM
> To: svn@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>