我希望我的程序员在将文件锁定在其工作副本中时始终发送消息(即svn lock tree.jpg -m "reason for locking"
)
有没有办法让预锁定钩子知道消息是否存在以及它是什么?
答案 0 :(得分:1)
查看存储库中的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)
...