有些時候提交了內容後,對於備註感覺不是寫得太好.需要修改備註.但系svn 的服務預設沒有開啟該功能.如果使用tortoisesvn 嘗試修改備註(在show log的備註欄中右鍵就可以看到編輯的功能)可能會出現以下錯誤:
repository has not been enabled to accept revision propchanges;
ask the administrator to create a pre-revprop-change hook
解決的方法如下:
在unix/linux平台上,在庫的hooks目錄下,複製pre-revprop-change.tmpl成pre-revprop-change。
cp pre-revprop-change.tmpl pre-revprop-change
在windows平台上,複製以下內容儲存為檔案hooks/pre-revprop-change.bat
@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
Svn修改自己已經提交的備註
svn客戶端修改日誌功能 且只能修改自己日誌 找到版本庫中hooks目錄下,將pre revprop change.tmpl檔案複製為pre revprop change.bat檔案,然後將pre revprop change.ba檔案內容 改為 set repos 1 set rev 2 set ...
SVN修改已提交版本的Log
在工作中一直是使用svn進行專案的版本控制的,有時候由於提交匆忙,或是忘了新增log,或是log內容寫的有錯誤。今日遇到此類情況,想要在檢視專案的日誌時新增log或是修改log內容,遇到如下錯誤 repository has not been enabled to accept revision p...
mysql 事件開啟備註
事件建立之後 1 檢查資料庫事件是否開啟,如果 event scheduler 等於 no表示開啟 select event scheduler show variables like event scheduler select event scheduler 2 開啟任務 事件 a set gl...