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

Re: Adding license text to files

From: Ulrich Eckhardt <ulrich.eckhardt_at_dominolaser.com>
Date: Thu, 11 Aug 2011 11:52:19 +0200

On Wednesday 10 August 2011, Jason Aubrey wrote:
> I'd like to use keyword substitution or something like it to
> automatically append/update license information in a large collection
> of files. In other words, I'd like the licensing information to be a
> property of the file, but also appear as text in the file. I can do
> the former with properties, but can't see how to do the latter in some
> automatic easy way. (Also, ideally, the license text in the file would
> come from the property on the file. )

You discovered yourself that you can set arbitrary properties on a file and
others already mentioned that you can't use this to expand keywords. What you
can do though is to create a script that checks the license property and
substitutes a placeholder in the file or prepends a header. What this doesn't
achieve is that anybody checking out will see the license. That said, even SVN
keyword substitution is performed on client-side, so it can be circumvented.

There is another thing that comes to mind. You could include a text stanza
like "see 'license.text' for licensing details" to the file and then use
svn:external to reference the file from somewhere else. That would allow
changing the license without having to touch hundreds of files.

Cheers!

Uli

-- 
ML: http://subversion.apache.org/docs/community-guide/mailing-lists.html
FAQ: http://subversion.apache.org/faq.html
Docs: http://svnbook.red-bean.com/
**************************************************************************************
Domino 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.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.
**************************************************************************************
Received on 2011-08-11 11:44:13 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.