1
작업 복사본에 파일을 잠글 때 프로그래머가 항상 메시지를 넣으려고합니다 (예 : svn lock tree.jpg -m "reason for locking"
) 메시지가 있던지 사전 잠금 후크가 알 수있는 방법이 있습니까 그게 뭐야?사전 잠금 후크에 대한 잠금 주석 액세스
작업 복사본에 파일을 잠글 때 프로그래머가 항상 메시지를 넣으려고합니다 (예 : svn lock tree.jpg -m "reason for locking"
) 메시지가 있던지 사전 잠금 후크가 알 수있는 방법이 있습니까 그게 뭐야?사전 잠금 후크에 대한 잠금 주석 액세스
저장소에서 hooks/pre-lock.tmpl
을 찾습니다. 내 경우 잠금 정보가 4 번째 매개 변수임을 나타내는 다음 정보가 들어 있습니다.
# PRE-LOCK HOOK
#
# The pre-lock hook is invoked before an exclusive lock is
# created. Subversion runs this hook by invoking a program
# (script, executable, binary, etc.) named 'pre-lock' (for which
# this file is a template), with the following ordered arguments:
#
# [1] REPOS-PATH (the path to this repository)
# [2] PATH (the path in the repository about to be locked)
# [3] USER (the user creating the lock)
# [4] COMMENT (the comment of the lock)
# [5] STEAL-LOCK (1 if the user is trying to steal the lock, else 0)
...
예. 감사! 저는 O'Reilly의 Subversion에서 Version Control의 두 번째 버전을 참조로 사용하고 있었으며 처음 세 가지 매개 변수 만 보여줍니다. 나는 이것이 꽤 새로운 것 같아요. – lamcro