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

Re: SVN: Head revision number auto update in code files

From: Ulrich Eckhardt <ulrich.eckhardt_at_dominolaser.com>
Date: Thu, 15 Aug 2013 09:17:48 +0200

Am 14.08.2013 08:33, schrieb Eilers Stefan:
> I want to implement the head revision number in my C project at the
> file version.h.
> Unfortunately there is only the codeword $Revision$ to set the last
> revision where the file version.h was changed:
> #define VERSION " FW.Vers. 0.0 $Revision: 146 $\n"

In most cases when someone asks for something like this, their desire
for this is to use it to achieve something else. Using the repository's
revision number is a bad idea though, because all it represents is the
sequence number of its internal state. For determining versions of
projects, it is useless and even confusing, because it is incremented on
any change in any branch of any project contained in that repository.
Even worse, checking out an old revision will not give you the same HEAD
revision as before the last commit. Lastly, you have to remember, SVN
doesn't define the term "project" at all, let alone support it in any
way, but just versions a tree of files in a repository.

Therefore: Use proper branches/tags where you assign meaningful names
and then use e.g. the $Id$ keyword to retrieve that part of the name or
maybe even set it in the according commit. Alternatively, stop
complaining that some solution doesn't work for your problem and
describe the actual problem instead.

Domino Laser GmbH, Fangdieckstra�e 75a, 22547 Hamburg, Deutschland
Gesch�ftsf�hrer: Hans Robert Dapprich, Amtsgericht Hamburg HR B62 932
Visit our website at http://www.dominolaser.com
Diese E-Mail einschlie�lich s�mtlicher Anh�nge ist nur f�r den Adressaten bestimmt und kann vertrauliche Informationen enthalten. Bitte benachrichtigen Sie den Absender umgehend, falls Sie nicht der beabsichtigte Empf�nger sein sollten. Die E-Mail ist in diesem Fall zu l�schen und darf weder gelesen, weitergeleitet, ver�ffentlicht oder anderweitig benutzt werden.
E-Mails k�nnen durch Dritte gelesen werden und Viren sowie nichtautorisierte �nderungen enthalten. Domino Laser GmbH ist f�r diese Folgen nicht verantwortlich.


To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2013-08-15 09:18:13 CEST

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

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