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

Re: svn:keywords ... a plea

From: Henrik Sundberg <storangen_at_gmail.com>
Date: Wed, 26 Mar 2008 18:43:43 -0400

2008/3/24, Ryan Schmidt <subversion-2008a_at_ryandesign.com>:
>
> On Mar 24, 2008, at 16:31, Graeme Vetterlein wrote:
>
> > In summary:
> >
> > 1: Adding keywords is (almost) always a GOOD IDEA ... just need
> > to take care in a few cases
> > 2: Getting keywords to work in most version control systems is
> > simple
> > 3: In SVN it is very hard:
> > i: Requires a special setting on each file
> > ii: Setting is 'free format' so cannot be syntax checked by
> > svn
> > iii: Automatic setting of option cannot be done on
> > repository (i.e. project) basis
> > iv: Setting of option on client side:
> > a: Mostly missing from documentation
> > b: Not given default values in generated files (like
> > many other options)
> > 4: Very few files I've found in SVN have the keywords set
> > (correctly) (this is MY experience ... many 10's of users)
>
>
> I haven't used other version control systems so I don't know first-
> hand how Subversion's keyword handling compares.
>
> Yes, auto-props are a client-side config setting. But you can install
> a pre-commit hook on the repository to reject any commit that does
> not conform to your policy, be that policy of certain keywords on
> certain types of files or anything else. If you reject a commit, you
> can explain to the user why (on stderr) and even direct them to a pre-
> made config file somewhere on a server of yours that they can download.
>
> Make sure you do not define an auto-props rule like "* =
> svn:keywords=Id" (to set svn:keywords to Id on all files) because
> this would also apply to binary files, on which keywords are possibly
> inappropriate and could result in corruption and data loss. Set
> automatic properties only on filename extensions which are text
> files. (There are fixed-width keywords, however, which can be used
> probably safely, for example, in Word documents and some other binary
> formats which contain textual data.)
>
> I think svn could check the syntax of svn:keywords to ensure it's
> valid. It just doesn't. Again, you could check the syntax of
> svn:keywords in a pre-commit hook, and reject the commit if the
> syntax isn't valid.
>
> Book suggestions should be sent to the svnbook mailing list. See the
> bottom of http://www.svnbook.org/

The need to add hook scripts to check that a mandatory configuration
is done correctly implies that something is bad. Why should the same
comfiguration be specified both on client and server side (with
completely different syntax as well)?

We have a few different repositories and we use different keywords in
them (I don't want it to look like I've done changes in vendor drops,
therefore no keywords is set in the vendor repository. But the client
configuration is done per client, not per repository -> The hook
scripts will need to give responses like "Configure client to use
config file for repo3".

$

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-03-26 23:44:05 CET

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.