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

automatic properties

From: Martin Furter <mf_at_rola.ch>
Date: 2003-09-11 04:16:53 CEST

Hello

I updated my auto-props patch and created another one containing 2
additional methods using apr_fnmatch (configurable with #ifdefs in
libsvn_client/add.c).
The difference between the three versions is just the function
auto_props_enumerator() in the mentioned file.
auto-props can be enabled/disabled in the config file and on the
commandline, add and import have different config entry for
enabling auto-props.

My updated patch can be found at:
http://queen.borg.ch:81/subversion/svn-0.29.0-7021-autoprops.diff

The configurable patch (with fnmatch) is at:
http://queen.borg.ch:81/subversion/svn-0.29.0-7021-autoprops-fnm.diff

The three versions are:

AUTOPROPS_SUFFIX

This is my old version. It matches filename suffixes, whole names and
can have default properties for files that didn't match.

AUTOPROPS_FNMATCH

This version uses apr_fnmatch. It can't have default properties for
filenames that do not match. The first match which is found wins.

The problem is that the config is stored in APR hashes and i can't
test the matches in the order as they are in the config file. So if
i put the following to rules into the config:

Makefile* = svn:eol-style=LF
*.jpg = svn:mime-type=image/jpeg

Then if i add 'Makefile.jpg' both rules can match and it is not
defined which one will be first found in the config hash.

AUTOPROPS_FNMATCH_PRIO

This version is basically the same as AUTOPROPS_FNMATCH. It adds
priorities to the rules:

0:* = svn:eol-style=native
1:Makefile* = svn:eol-style=LF
2:*.jpg = svn:mime-type=image/jpeg

The first rule is the default rule. When i now add Makefile.jpg it
will search the rule with the highest prio and find the third one.
The behaviour for rules with the same level is still undefined but
with the priority the conflicts can be solved.

All three versions are not compatible with the file format that
svn_load_dirs.pl uses. The fnmatch version is probably almost
compatible but in my opinion not the best solution for svn.
In either case svn_load_dirs.pl would have to be changed to read
config. I don't know how much work that would be.

For me the suffix version would be enough, but i would also be happy
with the fnmatch version with prio.

Any thoughts ?

Thanks
Martin

PS: The fnmatch versions compile but are completely untested.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Sep 11 04:19:00 2003

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.