#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Feb 2007
    Posts
    9
    Rep Power
    0

    Ant Tasks - Text Manipulation


    Hello All,

    I am trying to retrieve information from svn and then take the list I receive and get the latest build for a particular app.

    How would I be able to take this list and parse it to get the latest tag in the list. I am using Ant1.6.5 and only have core libraries.

    Code:
      <exec executable="svn" dir="${build.path.property}/${build.timestamp}" output="svn.tags">
        <arg line=" list svn://svn.server.ca/tags/App1 --username xxxxxx --password xxxxxx --incremental --xml" />
        </exec>
    Code:
     <list     path="svn://svn.server.ca/tags">
     	<entry kind="dir">
     		<name>8.1.2012.06.15</name>
     		<commit revision="1118">
     			<author>qqqqqq.a</author>
     			<date>2012-06-18T16:35:53.195721Z</date>
     		</commit>
     	</entry>
     	<entry kind="dir">
     		<name>8.2.2012.08.26</name>
     		<commit revision="1241">
     			<author>qqqqqq.a</author> 
    			<date>2012-07-27T12:33:27.842797Z</date>
     		</commit>
     	</entry>
      	<entry kind="dir">
     		<name>8.5.2012.12.20</name>
     		<commit revision="1826">
     			<author>qqqqqq.a</author>
     			<date>2013-01-08T16:58:58.394164Z</date>
     		</commit>
     	</entry>
     	<entry kind="dir">
     		<name>C7.4.2011.11.01</name>
     		<commit revision="1054">
     			<author>qqqqqq.a</author>
     			<date>2011-11-01T18:17:38.116380Z</date>
     		</commit>
     	</entry>
     </list>
    This is the result from the command.

    How do I find the latest entry in the list??

    Thanks for any assistance

    Jack
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2003
    Posts
    178
    Rep Power
    27
    Can you call from Ant a command line utility on your OS that would parse the file?
    If you are using Unix, you can write a simple awk or Perl script.

IMN logo majestic logo threadwatch logo seochat tools logo