2

请,

我需要知道开发人员何时“提交”项目,以便可以通知其他开发人员他们的版本需要更新。

有一些命令行可以做到这一点吗?

4

2 回答 2

4

There's a simple tool called CommitMonitor which you can use. It sits in the tray and notifies of new commits. This is windows-only, though.

http://stefanstools.sourceforge.net/CommitMonitor.html

Normally, a commit doesn't require everyone else to update immediately. Usually, developers decide themselves when they want to update, because an update in the middle of work will pull you back (i.e. you'll have to do a rebuild, fix merge conflicts in code being worked on etc.)

于 2013-10-31T17:02:33.137 回答
0

我们通过 Windows 中的 post-commit 钩子 post-commit.cmd 通知 tolist.txt 中的人员:


set repo=%1
set rev=%2
set svnlook="svnlook.exe"
if exist "%repo%\hooks\blat" set blat="%repo%\hooks\blat\blat.exe"

:ok

if [%blat%]==[] goto :exitzero

set tmpfile=c:\temp\blat%RANDOM%

:: Build subject line
for /f "tokens=1,2 delims=/" %%i in ('svnlook dirs-changed %repo% -r %rev%') do set lev1=%%i&&set lev2=%%j
for /f %%i in ('svnlook author %repo% -r %rev%') do set author=%%i
set subject="%author% committed to %lev1%/%lev2%"

:: Build email text
echo>>%tmpfile% Author, Commit date, Message length, and Message
%svnlook% info %repo% -r %rev% >>%tmpfile%
echo.>>%tmpfile%
echo>>%tmpfile% List of files changed:
%svnlook% changed %repo% -r %rev% >>%tmpfile%

set tolist="%repo%\hooks\tolist.txt"

%blat% -install smtpaddress.company.com myuserid@company.com
%blat% %tmpfile% -tf %tolist% -from Subversion -replyto myuserid@company.com -subject %subject%
del %tmpfile%

:exitzero
exit 0

tolist.txt 包含一个每行 1 行的 userid@company.com 电子邮件地址列表。

您必须下载 blat 并将其放在存储库的 'hooks' 子目录中,此命令文件才能工作。

于 2013-10-31T17:59:25.643 回答