Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Donkey Hottie Newsgroups: comp.lang.java.programmer Subject: Re: Get Rev Number from SVN to Display in Web App Date: Tue, 08 May 2012 15:09:36 +0300 Organization: A noiseless patient Spider Lines: 24 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Content-Transfer-Encoding: 7bit Injection-Info: mx04.eternal-september.org; posting-host="2CZGuqNdT70amojVWJXwUg"; logging-data="24155"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19CGkC9yt6DZKnco81gsL++" User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 In-Reply-To: X-Antivirus-Status: Clean X-Antivirus: avast! (VPS 120508-0, 08.05.2012), Outbound message Cancel-Lock: sha1:Oyb1gT/SgjE6iSKRPkD9AziNfZI= Xref: csiph.com comp.lang.java.programmer:14401 On 8.5.2012 14:20, Jan Burse wrote: > Donkey Hottie schrieb: >> Just put the "$Revision: $" into your source code > > Hi, thanks, but how do I get the revision from SVN? > Are there some SVN specific Ant tasks around, something > along get property? By revision I mean the transaction > number of SVN, not something I know and that I can put > manually in some file. > > Bye If you put that string to a file, svn will replace it with the revision number when the file is committed to svn. The file must be enabled to get this using command svn propset svn:keywords "Revision" filename http://johnbokma.com/mexit/2008/09/30/subversion-svn-keywords-property.html The next "svn commit" will update the file with revision number.