subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Schmidt <subversion-20...@ryandesign.com>
Subject Re: Wanted: pre-commit hook to prevent commits to externals definition
Date Fri, 04 Jun 2010 00:11:33 GMT

On Jun 3, 2010, at 18:34, Daniel Becroft wrote:

> On Fri, Jun 4, 2010 at 12:12 AM, David Aldrich <David.Aldrich@eu.nec.com> wrote:
> 
>> Please can anyone point me to an example of a svn pre-commit hook that prevents commits
to files that are members of an externals definition?
>> 
>> We want to allow such files to be committed only from within the external directory,
i.e. where they originate from.
> 
> I don't have an example of such a script. *But*, I'm not sure if even such a script could
be possible. My understanding of committing w/ externals, is that the modifications to the
externals are committed separately (or even excluded) from the main commit. This would certainly
be the case for externals pointing to a separate repository, and may be the case .
> 
> I just did a quick test (with both intra- and inter-repository external definitions),
and SVN does not seem to descend into the externals for a commit. The externals directory
has to be explicitly committed, which makes it no different from a normal working copy. 

Right. I don't think the server would be able to tell that a commit came from a working copy
that, on the client side, had been created by an externals definition. I think it all looks
the same to the server so I don't think such a hook script can be implemented.



Mime
View raw message