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

Re: C# AssemblyInfo integration

From: Ulrich Eckhardt <eckhardt_at_satorlaser.com>
Date: Thu, 27 Aug 2009 16:17:19 +0200

On Thursday 27 August 2009, Yves Goergen wrote:
> Am Do, 27.08.2009, 09:13, schrieb Ryan Schmidt:
> > The usual answer to this question is: that's not the way to do it;
> > this is:
> >
> > http://subversion.tigris.org/faq.html#version-value-in-source
>
> Okay. This is Linux. I'm sure its totally easy on Linux. But I'm not using
> Linux for this but Windows and Visual Studio 2008. And I'm not using
> TortoiseSVN but AnkhSVN which does integrate into VS. And the solutions
> I've seen on the web look like - excuse me - a hack. If SVN can do keyword
> substitution, why can't it do that in a way it is directly useable, too?

If SVN didn't have the markers available, it could not possibly know where to
replace anything. Yes, there are ways around this imaginable, but until now
they haven't been implemented. What already works is that you put the version
into a string and then strip the placeholder parts:

  # Python code
  svn_revision = int("$Revision: $"[10:-2])

That said, the revision numbers, which are internal IDs for use by Subversion
are IMHO a useless thing to put into the version of a program, in particular
since they change on a per-repository base and not on a per-file or
per-project base. Explicitly setting a version triple is way cleaner,
portable between version control systems and actually carries some meaning.

Uli

-- 
ML: http://subversion.tigris.org/mailing-list-guidelines.html
FAQ: http://subversion.tigris.org/faq.html
Docs: http://svnbook.red-bean.com/
Sator Laser GmbH
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
Sator Laser GmbH, Fangdieckstraße 75a, 22547 Hamburg, Deutschland
Geschäftsführer: Thorsten Föcking, Amtsgericht Hamburg HR B62 932
**************************************************************************************
           Visit our website at <http://www.satorlaser.de/>
**************************************************************************************
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. Sator Laser GmbH ist für diese Folgen nicht verantwortlich.
**************************************************************************************
------------------------------------------------------
http://subversion.tigris.org/ds/viewMessage.do?dsForumId=1065&dsMessageId=2387898
To unsubscribe from this discussion, e-mail: [users-unsubscribe_at_subversion.tigris.org].
Received on 2009-08-27 16:18:54 CEST

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.