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

AW: Adding license text to files

From: Markus Schaber <m.schaber_at_3s-software.com>
Date: Thu, 11 Aug 2011 08:15:28 +0200

Hi, Jason,

Jason Aubrey [mailto:aubreyja_at_gmail.com]
>
> 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. )
>
> Is it possible to do this? I haven't yet deduced how to do this from the
> svn book.

All you can do from subversion itself is to create a pre-commit hook which refuses commits which don't have that license in place. You then can write a tool or script which users run on the working copies before committing. (Some clients like TortoiseSVN provide client-side pre-commit hooks, so you can automate this step.)

Another solution would be a cron job (or windows task planner) which checks out the HEAD, fixes all files, and commits them back to the repository. This approach is less intrusive, but the revisions without license will be available in the repository.

Mit freundlichen Grüßen

Markus Schaber

___________________________
We software Automation.

3S-Smart Software Solutions GmbH
Markus Schaber | Entwicklung
Memminger Str. 151 | 87439 Kempten | Tel. +49-831-54031-0 | Fax +49-831-54031-50

Email: m.schaber@3s-software.com | Web: http://www.3s-software.com
CoDeSys Internet-Forum: http://forum.3s-software.com

Geschäftsführer: Dipl.Inf. Dieter Hess, Dipl.Inf. Manfred Werner | Handelsregister: Kempten HRB 6186 | USt-IDNr.: DE 167014915
Received on 2011-08-11 08:16:21 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.