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

Re: Automate the version number

From: Simon Large <simon.tortoisesvn_at_googlemail.com>
Date: 2007-05-10 13:35:32 CEST

On 10/05/07, Surdu Nicolae Marcel <postal2600@yahoo.com> wrote:
> Uooou! Niceee! I really didn't think is possible from the client! Thanks a loot!
> I still have a question though: It's possible to write the revision incremented:
> like $WCREV$+1 or something, cause I want to make when you click Commit, to
> first call this app to write the rev in a file in the repository, then call the
> actual commit, and so, if i just put $WCREV$, the revision will be always one
> behind.

That won't work. Revisions are repository-wide, so the next committed
revision will very likely not be $WCREV$+1.

Anyway, why do you want to write that into the repository? You only
need it in your working copy. I use this workflow:
1. Test and commit changes.
2. Run SubWCRev to update the local version header.
3. Rebuild the code to show the committed revision.

Note that I have a versioned header called "version.in". SubWCRev
processes this to generate "version.h" which is built into the
software. version.h is a generated file, so I add it to the ignore
list.

If your dev environment includes a pre-build step you could get it to
run SubWCRev automatically before each build.

In TSVN 1.5 (due later this year) there are client-side hooks, so you
will be able to set a post-commit and post-update hook to run
SubWCRev.

Simon

-- 
       ___
  oo  // \\      "De Chelonian Mobile"
 (_,\/ \_/ \     TortoiseSVN
   \ \_/_\_/>    The coolest Interface to (Sub)Version Control
   /_/   \_\     http://tortoisesvn.net
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: users-help@tortoisesvn.tigris.org
Received on Thu May 10 13:35:46 2007

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