2012-05-02 35 views
1

我希望我的程序员在工作副本中锁定文件时始终发送消息(例如,svn lock tree.jpg -m "reason for locking") 是否有预锁钩知道消息是否放置的方法它是什么?在预锁钩上访问锁注释

回答

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) 

... 
+0

是的。谢谢!我使用O'Reilly的Subversion版本控制第二版作为参考,它只显示前三个参数。我想这是非常新的。 – lamcro