我在網上發現了這個腳本,很少有人說它在爲他們的倉庫工作。 該腳本允許預先提交檢查,以檢查時強制檢查意見。 問題是我將它添加到SVN的掛鉤目錄中,現在所有提交(即使是帶有註釋的提交)都失敗,出現此錯誤消息 SVN pre-commit問題
「用無輸出預提交(退出代碼255)提交封鎖」現在,我不能改變的腳本或刪除它,因爲我得到了同樣的錯誤。有關如何恢復此預先提交腳本的任何建議?
#!/bin/bash
# [1] REPOS-PATH (the path to this repository)
# [2] TXN-NAME (the name of the txn about to be committed)
REPOS="$1"
REV="$2"
@echo off
::
:: Stops commits that have empty log messages.
::
@echo off
setlocal
# rem Subversion sends through the path to the repository and transaction id
set REPOS=%1
set TXN=%2
# rem check for an empty log message
svnlook log %REPOS% -t %TXN% | findstr . > nul
if %errorlevel% gtr 0 (goto err) else exit 0
:err
echo. 1>&2
echo Your commit has been blocked because you didn't give any log message 1>&2
echo Please write a log message describing the purpose of your changes and 1>&2
echo then try committing again. -- Thank you 1>&2
exit 1
所以你想恢復預提交鉤?或者要求修復pre-commit hook? –
可以。我試圖改變腳本或恢復更改,但無論如何,我收到相同的SVN錯誤。因此我被卡住了。刪除不起作用,任何更改不起作用:( – Gajanan
更新:我們必須通過要求root管理員刪除預先提交問題來解決此問題 – Gajanan