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

Re: [RFC] svn propset should require 'force' to set unknown svn: propnames

From: Branko Čibej <brane_at_wandisco.com>
Date: Sat, 24 Nov 2012 12:33:01 +0100

On 23.11.2012 18:09, Branko Čibej wrote:
> I agree that looking at the prefix is dicey, ...

... so I've tightened up the prefix matching so that --force is required
only when:

  * the prefix is exactly 3 letters long (propname[3] == ':');
  * and the first three letters differ in only one change from "svn"
      o this means, one replacement (e.g., "gvn" or "svm" or Svn", etc.)
      o or one transposition ("snv" or "nsv")
  * and if the rest of the property name following the colon exactly
    matches one of the known, user-visible property names.

If the prefix is exactly "svn:", then we'll require --force whenever the
property name is not known.

These rule will trip on

    svm:executable
    svn:exemutable

but not on

    svm:exemutable

I actually think the last case is a bit unfortunate, and would consider
allowing a one-letter difference in the property name and the prefix; so
that the last example would be flagged, but this would not:

    svm:ixemutable

I'm also considering requiring --force if one tries to use a revision
property name as a node property, and vice versa.

And I think it would be a good idea /not/ to suggest a different
spelling if the property name is too different from a know one.
Currently we'll get this:

$ svn ps svn:barfoo x .
svn: E195011: 'svn:barfoo' is not a valid svn: property name; did you mean 'svn:group'?
(To set the 'svn:barfoo' property, re-run with '--force'.)

In this case the suggestion is clearly bogus.

-- Brane

-- 
Branko Čibej
Director of Subversion | WANdisco | www.wandisco.com
Received on 2012-11-24 12:33:39 CET

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.