Stefan Küng wrote:
> Joseph Galbraith wrote:
>> Hmmm... I though that when we looked for a TSVN property,
>> we traversed the directory tree to the top of the wc looking
>> for the property, and stopped on the first directory that has it?
>>
>> If we applied that logic, and the user did a commit
>> in c:\wc\x\y\z, we'd look in c:\wc\x\y\z first, then
>> c:\wc\x\y, then c:\wc\x and so on.
>>
>> If the tsvn:my-hook property was set to a/b/c.pl on
>> c:\wc, then we'd use c:\wc as the default path and
>> a/b/c.pl as the relative path, leading to:
>> c:\wc\a\b\c.pl as the hook-script.
>>
>> Would this work? Or am I majorly confused?
>
> Yes, of course that would work. But you know that we suggest to users to
> set the project properties on *all* folders in the working copy, because
> you can't be sure from which url they check out the working copy. For
> example, many translators don't have TSVN checked out from trunk, but
> only the /Languages folder.
> So as I said, you'd have to also set the property on that folder, which
> then has a different relative path (in your case "../a/b/c.pl").
> And that's what I meant with users complaining about setting those
> properties on all folders - you can't just set the property recursively
> like all other props, you must add them individually on each folder (now
> imagine a user with a working copy consisting of 10 levels of folders...).
I see... I don't see a good solution then.
I think, if it were my call, I'd drop the requirement that
they be in the wc, force the hook-script to be an absolute
path, and use the 'get permission first' model to deal with
security concerns.
Actually, how about this, allow two different kinds of
paths: absolute local and repository-root relative.
o If the path is an absolute windows path, get permission
and then run it.
o If the path is repository-root relative, determine
if the file is contained with in the working copy,
and warn if not.
If so, get permission and then run it. If the user
says always run, we'd probably want to store the
repository UUID + relative path as authorized.
It seems like it would be possible to determine the location
of a file with-in the wc given it's path relative to the
repository root and the information returned from svn info...
but I am not a subversion expert, so I could be wrong.
We could use either different property names for the
different paths, or a syntax for the proerty, like:
tsvn:pre-commit
repo-hook=x/y/z
tsvn:pre-commit
file-hook=c:\Program Files\myspiffyhook
Thanks,
Joseph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Thu Aug 31 23:36:14 2006