Stefan Küng wrote:
> Joseph Galbraith wrote:
>
>>> to get the repository root, we'd have to contact the repository and
>>> ask for it first. And since I really don't want (and won't do) to
>>> contact the repository in e.g. the commit dialog (start-commit,
>>> pre-commit hooks), this isn't an option either.
>>
>> Interesting...
>>
>>> C:\Documents and Settings\galb>svn info e:\users\galb\trunk
>>> Path: E:\Users\Galb\trunk
>>> URL: svn+ssh://server/svn/trunk
>>> Repository Root: svn+ssh://server/dev
>>> Repository UUID: 0d606a1b-a9ff-564a-b23d-123d731c8e08
>>
>> It definitely didn't contact the repository, cause I
>> disabled the network so it couldn't reach the repo.
>> Maybe that information isn't exposed through the
>> api...
>>
>
> Yes, you can get the repo root by fetching the status, but that doesn't
> work for added files or folders. So if we would use those, the hook
> scripts wouldn't work for added folders (which users will consider a
> bug, because they want e.g. their hook script to check that all new
> files got the svn:eol-style property set).
> And, fetching the status is an expensive operation. We already have to
> fetch the status in the commit dialog, but the start-commit hook
> couldn't use those because the status hasn't been fetched yet. And the
> update hooks also wouldn't have it because we don't fetch the status for
> updates - if we did, then an update would take much longer.
>
>> I've about exhausted my ideas-- maybe there was something
>> in there that will lead you to the right solution... if not,
>> at least we know some things that won't work :-)
>>
>> Ultimately, I guess what I really care about is that:
>>
>> o The user / admin be able to disable the running
>> of hooks all together (failure to provide this
>> option is likely to make some enterprise or
>> business customers wary.)
>> o Even if hooks are enabled, the user should be
>> asked for permission before running the hook
>> at a given windows path (the first time at least.)
>
> I think the best (and only?) option is to go with global hook scripts
> specified in the settings dialog. Specifying the hook scripts via
> properties just doesn't seem to work in a reliable way.
Yes, I think you are right.
It would be nice to be able to optionally bind them
to a specific repository, but then we are back to
fetching status-- and while I'm sure we could find
something to fetch status on in the case of schedule
added files (an ancestor directory), I seem to
recall that SVN doesn't provide a way to stat just
the directory, so performance considerations
probably prevent us from implementing this.
Maybe we could ask the svn team for a inexpensive
way to retrieve repository information from a
working copy path (something that walks up the
tree until it finds a .svn folder, reads the repo
info from there and returns it.)
Thanks,
Joseph
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tortoisesvn.tigris.org
For additional commands, e-mail: dev-help@tortoisesvn.tigris.org
Received on Fri Sep 1 19:20:48 2006