Major Field
Tortoise SVN 에서 Edit log message 사용하기
s2Junn
2012. 1. 6. 14:47
Tortoise SVN에서는 다음과 같은 메뉴들을 제공한다.
간혹 Commit 후에 log message 를 안남겼다거나 잘못 남겼을 경우 Comment를 수정하고 싶을 경우가 있다. 그럴 땐 위의 메뉴에서 Eidt log message 를 선택하면 된다.
된다? 두둥! 그냥은 안되고 아마도 다음과 같은 에러 팝업을 보게될 것 이다.
저장소가 리비전 속성을 바꿀 수 있지 못하도록 설정되었습니다.
pre-revprop-change 훅을 생성해달라고 관리자에게 문의 하십시오 |
SVN서버를 관리해주시는 관리자님이 따로 없어서 문의는 할 수 없고, 이 문제를 해결하기 위해 아래와 같은 절차를 거쳤다.
1. 먼저 SVN서버에서 프로젝트의 Repository 로 이동한다.
2. hooks라는 폴더로 이동한다.
3. 마우스를 우클릭하여 새로 만들기 - 텍스트 파일을 선택 후 pre-revprop-change.bat 파일로 저장한다. (파일의 확장자를 .bat로 꼭 변경해야 한다.)
4. 생성된 파일을 우클릭하여 편집을 누른다.
5. 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 |
6. 자, 이제 다시 log message 를 수정해 보자. 생성된 파일은 아래에 첨부한다.