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

Re: [Issue 4124] New - Give servers sufficient means to disallow commits from clients based on version numbers

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: Mon, 20 Aug 2012 16:38:11 -0400

On 08/20/2012 03:38 PM, Mark Moe wrote:
>> Now, if we can find a way to expose the revprops to the start-commit hook,
>> all three RA layers should be able to provide early detection of commits
>> that would fail in pre-commit for revprop-related reasons. (And we should
>> consider this independently of the whole client-version capability stuff.)
> The ideal solution (for me) would be a start-commit hook that could
> query a temporary transaction that had everything (except actual file
> content) just like pre-commit can. That way I could use svnlook -t to
> block based on snv:log and/or the list of incoming changed files.
> Doing all of those blocks that I do now with pre-commit but before
> sending the actual file content would be great!

I agree -- having access to the freshly created txn from within start-commit
would provide the most natural interface for examining the metadata of the
commit in terms of what's in the revprops.

Now, currently the server doesn't know what files are going to be changed in
a commit until they've actually been changed. There's been talk, though,
about having the commit process pre-announce the to-be-modified files in the
new Editor v2 system. If we go that route -- and respecting the existing
definition of 'start-commit' as "before the transaction is even made" --
perhaps we could add a new hook which is post-txn-create, post-revprops-set,
post-modified-path-announcement, but still

> This is a bit different but related. I currently also block really
> big commits by looking at the transaction size on disk. It would also
> be nice to get an idea of the transaction size too before the entire
> transaction content has been sent. However, I don't know if the
> client knows this size before the transaction content is sent to the
> server.

Nope. No idea of the transaction size in advance of the commit. But it
certainly makes sense as a bit of information that an admin might want to
use to feed a commit allow/deny decision.

C. Michael Pilato <cmpilato_at_collab.net>
CollabNet   <>   www.collab.net   <>   Enterprise Cloud Development

Received on 2012-08-20 22:38:48 CEST

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