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

Re: Auto setting of the lock property for 1.2, Was: how to get a new project on the links page?

From: Benjamin Pflugmann <benjamin-svn-usr_at_pflugmann.de>
Date: 2004-12-24 17:12:48 CET

On Fri 2004-12-24 at 10:52:41 -0500, Scott Palmer wrote:
> On Dec 24, 2004, at 10:14 AM, Benjamin Pflugmann wrote:
>
> >On Fri 2004-12-24 at 09:28:54 -0500, Scott Palmer wrote:
> >>On Dec 24, 2004, at 3:02 AM, Benjamin Pflugmann wrote:
> >>>>In 1.2, will we be able to configure the server to automatically set
> >>>>this property for any file that is detected as binary?
> >>>
> >>>In Subversion's design, the server may not change any properties
> >>>without an explicit commit ...
> >>>But you can easily install a pre-commit hook that is rejecting any
> >>>commit where not all binary files have that property set...
> >>
> >>Is it the client or the server that decides if a file is binary or
> >>not?
> >
> >It's the client. ...
>
> >The decision whether a file is considered binary or not is based on
> >it's svn:mime-type property...
>
> Yes but as you point out below there is also an automated process that
> sets the mime type, so in effect the decision of whether a file is
> considered binary or not is based on a heuristic OR the mime type
> specified manually or by auto-props.

Yes, the summary is correct if you look at the effect.

[...]
> >But what you are missing to your luck is being able to set a property
> >based on the value of another property. But as was said before, you
> >can now easily reject commits having binary files without the
> >need-lock property. And writing a script for the client-side that
> >looks for all binary files and sets this property shouldn't be to hard
> >to do, either.
>
> But there is no way to use the same heuristic to set the "needs lock"
> property automatically. I think there should be.

Me too, that's what I meant with "what you are missing to your
luck..." above. We only differ on how we'd solve the problem.

> Rejecting commits with a pre-commit hook keeps the repository sane,
> but frustrates the developer because, well, it always frustrates the
> developer when a commit fails :).

Remember your original question was if it is possible. It is. And I
explained how. Yes, the solution is not perfect. But if you really
need this kind of locking, I cannot believe that a bit of developer
frustration is reason enough to not deploy Subversion (presumed
everything else meets your requirements).

> For the same reason svn:mime-type is handled automatically (e.g. you
> could just use a pre-commit hook to reject the commit in the case that
> the mime type wasn't set properly for a binary file), the same ability
> is needed for svn:lock (or whatever the name was).

I am not sure I agree on the method. Unfortunately I am not able to
give a technical reason, it's just a gut feeling. Maybe I can answer
that after some sleep. Regardless, I suggest you bring your proposal
to the attention of the dev list.

> Considering how close the current implementation is to being able to do
> this, I suggest a config option be added to tell subversion to handle
> the lock property automatically for all files that it would not do an
> automatic merge for. That seems to cover the common cases for when
> locking is really more required than optional.

Bye,

        Benjamin.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Dec 24 17:15:12 2004

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.