設定SVN伺服器允許修改日誌

2021-06-22 06:39:56 字數 1336 閱讀 2360

在使用svn進行**版本提交時,經常設定強制填寫日誌以便記錄沒次修改的內容,當時有時候需要修改log, 這個時候需要做下配置:

在版本庫的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本地伺服器設定

本地建乙個伺服器 svnadmin create d mysvn myproject myproject資料夾下面,我們會發現多了幾個資料夾和檔案,我們開啟conf資料夾,然後再開啟svnserve.conf檔案,找到如下行 password db passwd,然後把它前面的 去掉,表示mypro...

Redis設定允許其他伺服器訪問

今天遇到個問題,專案用的微服務其中乙個模組分在其他伺服器,遠端連線redis出現了問題,先在阿里雲設定安全組端號,發現還是不行,最後找到了是redis配置的問題。在配置檔案中,有一行 bind 127.0.0.1 這條命令是設定redis繫結本機,不允許其他訪問,把這條注釋後,就可以隨便ip訪問了,...

SVN伺服器windows服務自啟動設定

建立bat檔案,內容如下 sc create mysvnserver binpath d program files subversion bin svnserve.exe service r e svnrepo displayname svnservice depend tcpip start a...