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

Re: Newbie question: getting the revision number substituted in the source code

From: Karl Fogel <kfogel_at_newton.ch.collab.net>
Date: 2003-01-08 19:14:29 CET

"Johan Lindh" <johan@linkdata.se> writes:
> This would be neat, but the output is
> Head revision: 1

Yes, you have to munge it, of course.

> What would be really nice is if we could get it all formatted nicely...
> The dream might be something like (assuming tag "1.2" and revision 2311):
>
> > svn print "Version %t.%r, built %D %T"
> Version 1.2.2311, built 2003-01-08 19:32:00

You can (and should) accomplish the same thing by parsing that stuff
from the output of other svn commands, munging appropriately, and
splicing it into your build however you wish.

Subversion's main job is to be a version control system, not a text
substitution engine :-). True, we do have CVS-like keywords, because
the benefit/cost ratio was quite high, but that's all we're doing
before 1.0. No promise for what happens after 1.0 -- this is not our
focus, although if someone makes a patch, it could go in.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jan 8 19:59:20 2003

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