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

Re: RFE: Add Subversion keyword for year

From: Kevin Grover <kevin_at_kevingrover.net>
Date: Mon, 18 Apr 2011 16:42:08 -0700

There are plenty of templating and text replacement programs around. Why
not use one of them?

IMO, it's feature bloat to try to make svn do everything possible for every

Do you really want a Copyright notice that reads "Copyright 2008-$Year: 2011
$ FooBar Inc"? I doubt it.

$ echo "Copyright 2008-_at_YEAR@ FooBar Inc" > cr.in

$ sed "s/@YEAR@/$(date +%Y)/g" cr.in > cr

$ cat cr
Copyright 2008-2011 FooBar Inc

Yes, that was a UNIX example. I can make the same thing work under Windows.
Plus, there are more generalized solutions: m4 (for example).


On Mon, Apr 18, 2011 at 14:29, Alex Vincent <ajvincent_at_gmail.com> wrote:

> I'm currently in the process of updating copyright notices where I work.
> To me, this is an ideal place for a SVN keyword:
> Copyright 2008-$Year$ MyCompany
> The SVN keywords listed in the online documentation list Date, but it's far
> too specific for a copyright. As an alternate, perhaps a special formatting
> keyword for dates could be established: $Date(YYYY)$, for example.
> Alex Vincent
> San Leandro, CA
> --
> "The first step in confirming there is a bug in someone else's work is
> confirming there are no bugs in your own."
> -- Alexander J. Vincent, June 30, 2001
Received on 2011-04-19 01:42:39 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.