[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

AW: keyword text substitution

From: Felix Gilcher <gilcher_at_exozet.com>
Date: 2006-10-02 18:41:40 CEST

Dan Crosta <mailto:dcrosta@gmail.com> schrieb am Montag, 2. Oktober 2006 18:38:

> I've been working on a project for a while, and would like to have
> development copies have a version number like 0.1.<revision #>. This
> is python, so I've been setting a variable __version__ in an
> __init__.py file in the package directory for this project. I had
> used the line:
>
> __version__ = '0.1.%s' % ('$Rev$'.split(' ')[1])
>
> which I thought was pretty clever, except that it doesn't work --
> because the line only gets updated by svn whenever the file gets
> updated, not whenver you run 'svn update' on the working copy it lives
> in. since there's not much besides license text and a few metadata
> variables in this __init__.py file, it won't get updated frequently,
> and so the version string will pretty much always be out of date.
>
> is there a way (some svn keyword perhaps?) that i can make subversion
> redo this substitution every time an svn update or svn commit happens?
> (are there any other commands that can change the revision of a
> working copy?) or am i barking up the wrong tree?

Probably this FAQ item is what you're looking for: http://subversion.tigris.org/faq.html#version-value-in-source

>
> thanks,
> - d
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: users-help@subversion.tigris.org

you're welcome

fg

-- 
Felix Gilcher
Head of IT Development
Exozet Berlin GmbH
Rotherstraße 20
10245 Berlin
eMail: gilcher@exozet.com
URL: www.exozet.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Oct 2 18:42:22 2006

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.