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

Re: Auto-prop not working?

From: Michael L Brown <michael.l.brown_at_philips.com>
Date: 2005-04-22 19:43:32 CEST

The question I have is why would Subversion apply keyword properties to
binary files? You would think that when it detects a binary file it would
ignore a property keyword request, especially if it is an auto-prop. Since
it is auto, it should automatically determine that doing keyword
substitutions on binary files is bad and not do it. If a keyword property
is really wanted, then a forced setting can be done via the propset
command.

Having a user do this is also asking for trouble. Based upon our past
history, a user will very easily forget to add the property stuff to the
commit.

Since a pre-hook seems to be the way to do this, can a pre-hook be told
that the file is binary? If not, does this mean I have to do my own
testing of the file, and if so then add the keyword property to the
command the user sent?

Lots to learn.

MB
 --
Mike Brown (Michael.L.Brown@Philips.com)
            Lotus Bloats: Michael L Brown/MSN/MS/PHILIPS
Philips/ADAC, Madison, WI
Desk: 608-288-6969 Fax: 608-298-2101
PMS direct: 164-6969
You design it, I'll build it!

Ben Collins-Sussman
04/22/2005 11:32 AM

To
"Weintraub, David" <David.Weintraub@ilex.com>
cc
Michael L Brown/MSN/MS/PHILIPS@PHILIPS
Subversion mailing list <users@subversion.tigris.org>
Subject
Re: Auto-prop not working?
Classification

On Apr 22, 2005, at 11:11 AM, Weintraub, David wrote:

> Actually, even if you specify all possible text file patterns, you
> still have a problem. What if a user does their work on a system where
> you didn't setup the autoproperty for them?
>
> This points to several missing features with Subversion:
>
> 1). No server side configuration. You have to basically set up this
> configuration on all client machines. What if the user overrides this
> configuration? What if the user decides to do work from home on his
> personal computer where you did not setup this client configuration?
> What happens when a machine gets replaced?

This is planned for 1.3. It's a hot item.

>
> 2). Limited power of the svnserve and svnlook commands. Hooks can be
> used to enforce policy, so maybe you'll program a post-commit hook
> that examines a file that gets committed, and automatically sets the
> svn:keyword property if it isn't already set. Oops, the propset and
> propget commands don't work without first creating a working directory
> and checking out that file in that working directory. A hook doesn't
> work.
>

You've got it backwards. You should be using a *pre*-commit hook to
reject any commit which doesn't have properties set correctly. It can
send a nice message back to the use explaining why the commit was
rejected.
Received on Fri Apr 22 19:46:29 2005

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.