Discussion:
SVN 1.8.10 server side configured autoprops
s***@klammo.dk
2015-04-01 14:39:07 UTC
Permalink
hello svn-server-experts,


i want to define autoprops (serverside dicated) for some repos in my
large SVN installation. However it have been missed out in the
documentation how this is achieved. The docs rely on a "config file",
but not a name to it, so i tried and make a
$REPOS_NAME/conf/[repons.conf|config] - doesnt work. I add this to my
serverside config:


####
[miscellany]
enable-auto-props = yes

[auto-props]
*.xml = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL
*.css = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL
*.xsl = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL
*.htm = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL
*.html = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL
*.txt = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL
*.js = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL
*.java = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL
*.jsp = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL
*.cmd = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL;svn:eol-style=CRLF
*.bat = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL;svn:eol-style=CRLF
*.sql = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy URL
*.properties = svn:keywords=Date Revision Author HeadURL Id
LastChangedDate LastChangedRevision Rev LastChangedBy URL
*.sh = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy
URL;svn:executable;svn:eol-style=LF
*.pl = svn:keywords=Date Revision Author HeadURL Id LastChangedDate
LastChangedRevision Rev LastChangedBy
URL;svn:executable;svn:eol-style=LF
####


I connect svn server via DAV/HTTP, authentication is made in httpd
into AD. Server version is 1.8.10 and clients are all 1.8+ (according
to the servers log). In a few days i will be running 1.8.13 server-side.


I hope someone will guide me into configuring this autoprop setup.. Please :)


br
thomas
Andreas Stieger
2015-04-01 15:13:28 UTC
Permalink
Hello,

> i want to define autoprops (serverside dicated) for some repos in my
> large SVN installation. However it have been missed out in the
> documentation how this is achieved. The docs rely on a "config file",
> but not a name to it, so i tried and make a
> $REPOS_NAME/conf/[repons.conf|config] - doesnt work. I add this to my

Huh? While the run-time client configuration uses a config file section like below,
[miscellany]
enable-auto-props = yes

this was for the *previous* client-side autoprops feautre. You want this inside the repository tree, as versioned properties. See
https://subversion.apache.org/docs/release-notes/1.8.html#repos-dictated-config

So you would start with setting or editing the svn:auto-props property on a suitable repository path.

Andreas
s***@klammo.dk
2015-04-01 15:32:42 UTC
Permalink
Hello Andreas+

So i have tried to read the RDC docs, but it doesnt make any sense -
it tells alot about how the configuration should look, but not how to
implement the feature...

I realize that the clientside can still be modified accordingly, and I
want to push/enforce the keyword configuration from serverside.

The documentatio doesnt make any sense to me... Did you have success
implementing RDC?



br
thomas



Quoting Andreas Stieger <***@gmx.de>:

> Hello,
>
>> i want to define autoprops (serverside dicated) for some repos in my
>> large SVN installation. However it have been missed out in the
>> documentation how this is achieved. The docs rely on a "config file",
>> but not a name to it, so i tried and make a
>> $REPOS_NAME/conf/[repons.conf|config] - doesnt work. I add this to my
>
> Huh? While the run-time client configuration uses a config file
> section like below,
> [miscellany]
> enable-auto-props = yes
>
> this was for the *previous* client-side autoprops feautre. You want
> this inside the repository tree, as versioned properties. See
> https://subversion.apache.org/docs/release-notes/1.8.html#repos-dictated-config
>
> So you would start with setting or editing the svn:auto-props
> property on a suitable repository path.
>
> Andreas
Andreas Stieger
2015-04-01 15:49:16 UTC
Permalink
Hello,

> So i have tried to read the RDC docs, but it doesnt make any sense -
> it tells alot about how the configuration should look, but not how to
> implement the feature...

To implement, set versioned properties named svn:auto-props in the repository. See help about propset, propedit commands, or the equivalent function in a non-cli client.

> I realize that the clientside can still be modified accordingly, and I
> want to push/enforce the keyword configuration from serverside.

Set svn:auto-props properties using an svn client on a path, e.g. the root of the repository, or trunk, and commit.

> The documentatio doesnt make any sense to me... Did you have success
> implementing RDC?

Yes. Note that you need clients capable of interpreting both inherited properties and repository-dictated config. Read: 1.8.

Andreas
s***@klammo.dk
2015-04-05 23:44:51 UTC
Permalink
it might be due to my lack of expertise in the field of svn admin...
but, i dont understand how to implement serverside dictated autoprops
- the documentation doesnt talk to me, and i am lost...

isnt there any hands on examples ?


br
thomas


Quoting Andreas Stieger <***@gmx.de>:

> Hello,
>
>> So i have tried to read the RDC docs, but it doesnt make any sense -
>> it tells alot about how the configuration should look, but not how to
>> implement the feature...
>
> To implement, set versioned properties named svn:auto-props in the
> repository. See help about propset, propedit commands, or the
> equivalent function in a non-cli client.
>
>> I realize that the clientside can still be modified accordingly, and I
>> want to push/enforce the keyword configuration from serverside.
>
> Set svn:auto-props properties using an svn client on a path, e.g.
> the root of the repository, or trunk, and commit.
>
>> The documentatio doesnt make any sense to me... Did you have success
>> implementing RDC?
>
> Yes. Note that you need clients capable of interpreting both
> inherited properties and repository-dictated config. Read: 1.8.
>
> Andreas
Andreas Stieger
2015-04-06 10:59:45 UTC
Permalink
Hello,

On 06/04/15 01:44, ***@klammo.dk wrote:
> it might be due to my lack of expertise in the field of svn admin...
> but, i dont understand how to implement serverside dictated autoprops -
> the documentation doesnt talk to me, and i am lost...
>
> isnt there any hands on examples ?

The problem seems to be that you are looking for an answer in a
depth-first way. I assumed that the connection to other well documented
usage was made.

I had explained that the repository-dictated autoprops configuration is
implemented using versioned properties in the repository, and that the
property name is called "svn:auto-props" At this point, the
documentation on setting properties becomes relevant, which itself is no
longer special to repository-dictated configuration. See:
http://svnbook.red-bean.com/en/1.7/svn.advanced.props.html#svn.advanced.props.manip

Use propedit/propset on a suitable object inside your repository, like
"/" (root), "/trunk" or a path of your choice that fits your use case.
$ svn propedit svn:auto-props FOO
Here FOO is either local working copy path or a repository URL. If FOO
is a URL, the change will be committed as a revision immediately. If it
is a local working copy path, the change will be repository visible when
it is committed. This is also not special for repository-dictated
configuration but works the same for all versioned properties.

This then is how this may look when set, although the syntax is no
different from the runtime configuration previously known:
$ svn propget svn:auto-props https://svn.example.com/repo1/trunk
*.foo = svn:mime-type=image/foo

This will make any files matching *.foo be automatically added with the
svn:mime-type property set to image/foo by clients that are aware of
inherited properties. This is how this looks in a working copy:
$ touch testwc/empty.foo
$ svn add testwc/empty.foo
A (bin) testwc/empty.foo
"(bin)" indicates that a binary mime type (here: image/*) was
automatically added for the empty file. And indeed it is the made-up
mime type configured via auto-props:
$ svn propget svn:mime-type testwc/empty.foo
image/foo

Andreas
Loading...