SVN提交文件后,想再写log
使用svn 的edit log message进行编辑时确定时会有警告
DAV request failed; it's possible that the repository's pre-revprop-change hook
either failed or is non-existent At least one property change failed; repository is uncahnaged
Error setting property "log":
Repository has not been enabled to accept revision propchanges;
ask the administrator to create a pre-revprop-change hook
提示让管理员创建pre-revprop-change hook
去google了下得到如下答案解决了问题
Basically copy the code below into a text file and name it pre-revprop-change.bat and save it in the /hooks subdirectory for your repository
@ECHO OFF :: Set all parameters. Even though most are not used, in case you want to add :: changes that allow, for example, editing of the author or addition of log messages. set repository=%1 set revision=%2 set userName=%3 set propertyName=%4 set action=%5 :: Only allow the log message to be changed, but not author, etc. if /I not "%propertyName%" == "svn:log" goto ERROR_PROPNAME :: Only allow modification of a log message, not addition or deletion. if /I not "%action%" == "M" goto ERROR_ACTION :: Make sure that the new svn:log message is not empty. set bIsEmpty=true for /f "tokens=*" %%g in ('find /V ""') do ( set bIsEmpty=false ) if "%bIsEmpty%" == "true" goto ERROR_EMPTY goto :eof :ERROR_EMPTY echo Empty svn:log messages are not allowed. >&2 goto ERROR_EXIT :ERROR_PROPNAME echo Only changes to svn:log messages are allowed. >&2 goto ERROR_EXIT :ERROR_ACTION echo Only modifications to svn:log revision properties are allowed. >&2 goto ERROR_EXIT :ERROR_EXIT exit /b 1
相关推荐
`pre-revprop-change`钩子是SVN服务器端的一种特殊脚本,它在用户尝试更改已提交版本的属性(如作者、日期或注释)之前执行。如果未正确配置此钩子,用户可能会收到错误提示:“此版本库不允许修改版本属性”。这是...
在备用服务器的`hooks`目录下,创建并配置`pre-revprop-change`脚本,用于处理版本属性变更前的操作: ```bash cd /u01/svn/data/hooks cp pre-revprop-change.tmpl pre-revprop-change vi pre-revprop-change...
通过 `pre-revprop-change` hook,你可以设置规则来阻止对修订版本属性(如 log message)的更改,从而维护历史记录的完整性。 4. 权限控制:hooks 可用于实现更细粒度的权限控制,例如,只允许特定用户或组执行...
- **pre-revprop-change** 和 **post-revprop-change**:用于处理修订属性的变更,比如修改日志消息。 - **pre-lock** 和 **post-lock**:在锁定资源时运行,可以限制谁可以锁定资源。 - **pre-unlock** 和 **post-...
在SVN的repository目录下的hook子目录中,有一个名为“pre-commit.tmpl”的模板文件。我们需要创建一个名为“pre-commit.bat”的批处理文件来实现日志格式检查功能。具体脚本内容如下: ```batch setlocal set ...
- pre-revprop-change.bat:这是一个在修订版本属性被改变前执行的钩子脚本,用于防止修订版本属性的改变,确保版本库的一致性。 4. 定时任务: - 文档中提到使用批处理文件和计划任务(如Windows的at命令)来...