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

RE: Configuring commit e-mails through SVN properties

From: McKenna, Simon (RGH) <Simon.McKenna_at_rgh.sa.gov.au>
Date: 2005-04-21 06:37:24 CEST

Hey Bruno,

-> Has anybody tried something similar? Any comments or improvements?

Thanks for sharing!

I've got a similar system working (outside of perl/python-land)
which is doing much the same thing and have been pondering a
few issues:

- Is it better to have hook:commit-email per file or per directory?
  I prefer the 'bugtraq' approach and look on the directory of each
  file committed using 'svnlook dirs-changed' for the revision.

- Should there option for hook:propchange-email property? so that
  property changes on a file or directory can be handled independently,
  but in much the same way, except using the post-propchange hook.

- Do you handle multiple email addresses per property?
  (eg. my approach accepts comma and line delimited addresses)

- Is it sane to extend concept further to govern repository access?
  (eg. for those who using ra_svn/svnserve and need fine-grained control)

On pre-commit or start-commit hooks, recursive up the tree looking
for hook:commit-access property which hold a list of users with commit
rights and control on a per-directory (and per-file?) basis, with
property hook:commit-access itself controlled by hook:propchange-access
property, which has a property=value line delimited syntax.

Scenario:

1. admin creates repository

2. admin adds property: hook:propchange-access to root with value:
   hook:propchange-access=admin
   hook:commit-access=admin,user1

3. admin gives themselves and user1 commit rights by adding property:
   hook:commit-access with value: admin,user1

4. user1 gives user2 commit rights by modifying property:
   hook:commit-access with new value: admin,user1,user2

5. user1 or user2 then create directory structure and start committing,
   but only admin or user1 determines who can have commit access.

The pre-propchange hook prevents anyone other than admin from modifying
the hook:propchange-access property, it also prevents anyone other than
admin or user1 from modifying the hook:commit-access property.

In other words - user2 couldn't give someone else commit rights,
and user1 couldn't change who is allowed to give commit rights.

The pre-commit (or start-commit?) hook prevents anyone other than admin,
user1 or user2 from committing by checking hook:commit-access property.

The general idea being we create an extensible yet enforceable
system to control who can do what from within svn properties and
visible to anyone allowed to browse the repository, without having
to annoy the repo administrator when changes are needed :)

If there was a pre-checkout hook, read repository control should
also be possible through this approach (ie. complete access control).

Thoughts?

peace
si

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Apr 21 06:38:08 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.