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

Re: svn:keywords last changed checked out directory revision number

From: Adam Gibson <agibson_at_ptm.com>
Date: 2004-03-30 21:19:03 CEST

On Tue, 2004-03-30 at 12:03, John Peacock wrote:
> Adam Gibson wrote:
>
> > How do most people deal with including a revision number in their apps?
>
> For a Unix-like OS, the following will do what you might want:
>
> $ echo -n "#define REVISION " > rev.h
> $ svnversion . >> rev.h
>
> NOTE: you should do `svn up' prior to this, or you might get a mixed revision
> answer (like 230:231 where the WC was just committed but not yet updated ).
>
> I say "might want" above because the revision number is not necessarily the
> correct thing to use in all cases. If you have a single project repository, the
> revision number will always reflect changes to that project (conceivably on a
> branch as well as on the trunk). However, if you have multiple projects in the
> same repository, the revision number will increase in relation to work on all
> projects, so you could conceivably have huge jumps in revision number for a
> project which changes little.
>

It seems the -c argument to svnversion 'svnversion -c .' gives me what I
want after an update(not the current repository version but the last
changes on the directory that was checked out assuming I am in the top
level directory that was checked out when issuing that command).

Thanks for pointing me in the right direction.

-- 
Adam Gibson <agibson@ptm.com>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Tue Mar 30 21:19:37 2004

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.