Closed BrightLight closed 12 months ago
It is now possible to check client capabilities in the "start commit" hook, like this:
<CapabilityCondition Capability="MergeInfo" />
Full example (we now need to check within the instruction not only the HookType, but also the capability):
<!-- Start-Commit instructions -->
<Instructions>
<Conditions>
<HookTypeCondition HookType="StartCommit" />
<CapabilityCondition Capability="MergeInfo" />
</Conditions>
</Instructions>
btw, I have at the moment no idea which capabilities are reported by a subversion client. Will update here when I know that.
Since Subversion 1.5, the "start-commit" hook batch gets a third argument "CAPABILITIES". This is already processed by RepoCop, but it doesn't actually perform any checks right now for "start-commit" event. It should be possible to write conditions that check for certain capabilities of the client and if not present deny the commit.