ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Abley <james.ab...@volantis.com>
Subject Re: No Apache Ant Support for Subversion? Oh man :(
Date Thu, 08 Sep 2005 07:04:31 GMT
On Wed, 2005-09-07 at 22:22, S I wrote:
> I'm now looking at <concat> not sure how to go about it and I do realize Ant 
> is not a script lanugage however, I'm not  sure how to go about my problem 
> either except resorting to a scripting language.  I will briefly state my 
> problem and please tell me if parsing could be achieved via any Ant task?
> 

    <loadfile srcfile="file.txt" property="revision.number">
        <filterchain>
	    <!-- Might need to play around with the number of lines returned
here -->
            <tailfilter lines="1" />
            <tokenfilter>
		<!-- Only interested in the number part -->
                <replaceregex pattern="[^0-9]" replace="" flags="gi"/>
            </tokenfilter>
        </filterchain>
    </loadfile>

    <echo>${file.txt}</echo>

Didn't need <concat /> in the end.

James

> I have a text file which is generated by running
> 
> c:\>svn update > file.txt.
> 
> file.txt's last line is "Updated to revision 20779."
> 
> I would like to extrapolate only the numbers and pass it back to : 
> ${Revision.Number} = 20779
> 
> c:\>svn copy -r ${Revision.Number} /trunk  /tag/${Revision.Number}
> 
> Is there anyway to do this in Ant?  Looks like I have to write a perl script 
> and pass the value back to the Ant script by running <exec>
> 
> 
> ----Original Message Follows----
> From: James Abley <james.abley@volantis.com>
> Reply-To: "Ant Users List" <user@ant.apache.org>
> To: Ant Users List <user@ant.apache.org>
> Subject: Re: No Apache Ant Support for Subversion?  Oh man :(
> Date: Wed, 07 Sep 2005 07:36:57 +0100
> MIME-Version: 1.0
> Received: from mail.apache.org ([209.237.227.199]) by mc10-f40.hotmail.com 
> with Microsoft SMTPSVC(6.0.3790.211); Tue, 6 Sep 2005 23:37:11 -0700
> Received: (qmail 50368 invoked by uid 500); 7 Sep 2005 06:37:03 -0000
> Received: (qmail 50350 invoked by uid 99); 7 Sep 2005 06:37:03 -0000
> Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49)    by 
> apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2005 23:37:03 -0700
> Received: pass (asf.osuosl.org: local policy)
> Received: from [213.86.197.2] (HELO mail.volantis.com) (213.86.197.2)    by 
> apache.org (qpsmtpd/0.29) with ESMTP; Tue, 06 Sep 2005 23:37:14 -0700
> Received: squid 10.20.30.27 from 10.20.30.21 10.20.30.21 via HTTP with 
> MS-WebStorage 6.0.6249
> Received: from c-jabley by squid; 07 Sep 2005 07:36:57 +0100
> X-Message-Info: JGTYoYF78jEHjJx36Oi8+Z3TmmkSEdPtfpLB7P/ybN8=
> Mailing-List: contact user-help@ant.apache.org; run by ezmlm
> Precedence: bulk
> List-Unsubscribe: <mailto:user-unsubscribe@ant.apache.org>
> List-Help: <mailto:user-help@ant.apache.org>
> List-Post: <mailto:user@ant.apache.org>
> List-Id: "Ant Users List" <user.ant.apache.org>
> Delivered-To: mailing list user@ant.apache.org
> X-ASF-Spam-Status: No, hits=0.0 required=10.0tests=
> X-Spam-Check-By: apache.org
> References: <BAY105-F54793D21D91573FC95E06D8A60@phx.gbl>
> X-Mailer: Ximian Evolution 1.4.6
> X-Virus-Checked: Checked by ClamAV on apache.org
> Return-Path: user-return-52164-xiamak=hotmail.com@ant.apache.org
> X-OriginalArrivalTime: 07 Sep 2005 06:37:11.0164 (UTC) 
> FILETIME=[93794BC0:01C5B376]
> 
> On Wed, 2005-09-07 at 04:37, S I wrote:
>  > Hi
>  >
>  > I wish there was Ant Core Task support for Subversion.  I have downloaded
>  > bunch of 3rd party utilities, althought they accomplish the job somewhat
>  > clumsily, they'll do for now.  Is there going to be support for 
> Subversion
>  > soon?
>  >
>  > My 2nd question:  I'm modifying my Ant scripts to commit couple of files
>  > into SVN and then tag the repository.  I don't like the limited options 
> of
>  > SVN in how it handles tagging.  I run my build files from my WinXP and
>  > repository's on a Linux server under Apache.  Does Ant have any feature 
> to
>  > allow me to parse a log file and grep for a revision number, then pass 
> that
>  > rev# to the "svn copy /trunk /tag/rev#" without resorting to Perl or any
>  > other scripting language?
>  >
> 
> Have a look at <concat /> with filterchains, and then load the output
> into your revision property via <loadfile />
> 
> James
> 
>  > Thanks
>  >
>  >
>  >
>  > ---------------------------------------------------------------------
>  > To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>  > For additional commands, e-mail: user-help@ant.apache.org
>  >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message