SVN 一開始的設定是沒有開放修改作者及紀錄訊息的權限,因此只要使用這兩個功能就會跳出以下的訊息

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 unchanged


解決方式:

在WIndows環境底下

1.找到版本庫中hooks目錄下,將pre-revprop-change.tmpl 複製 為 pre-revprop-change.bat

2.修改pre-revprop-change.bat檔中最後內容為

# Here is an example hook script, for a Unix /bin/sh interpreter.# For more examples and pre-written hooks, see those in
# the Subversion repository at
# [url]http://svn.collab.net/repos/svn/trunk/tools/hook-scripts/[/url] and
# [url]http://svn.collab.net/repos/svn/trunk/contrib/hook-scripts/[/url]
rem Only allow log messages to be changed.
if "%4" == "svn:log" exit 0
echo Property '%4' cannot be changed >&2
exit 1

在Linux環境下

將文件pre-revprop-change.tmpl改名為pre-revprop-change,並加上執行許可

REPOS="$1"
REV="$2"
USER="$3"
PROPNAME="$4"

if [ "$PROPNAME" = "svn:log" ]; then exit 0; fi
exit 1

創作者介紹
創作者 wmhuang 的頭像
wmhuang

喵姑娘的備忘錄

wmhuang 發表在 痞客邦 留言(2) 人氣()


留言列表 (2)

發表留言
  • para
  • thank you, your work save me a lot of time!
  • 小風
  • 非常謝謝您的分享!!