在邮政SVN更新提交 - [射击,但没有结果] [英] SVN Update in Post Commit - [Firing, but no results]

查看:147
本文介绍了在邮政SVN更新提交 - [射击,但没有结果]的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是我的SVN commit.bat后挂机脚本。

但我的工作副本不会自动更新后,提交已经发生了。

但是,如果我手动打开此文件。一切都按预期工作。

请指引我。

 关闭@echoCLS
回声==启动系统的实例变量...
回声。 - 设置变量...::在这里,你需要作出一些改变,以适应您的系统。
设置源= C:\\用户\\ subbarao.b \\桌面\\ SVNRepo
设置SVN = C:\\ Program Files文件\\ TortoiseSVN的\\ BIN \\::除非你想修改剧本,这就够了。回声。 %资源%
回声。 %SVN%
回声。 ++完成设置变量。
回声。
回声==从SVN更新源
回声。 - 运行更新...
SVN%%\\ TortoiseProc.exe/命令:update /路径:%SOURCE%/ closeonend:2
回声。 ++完成。回声。 - 打扫干净...
设置源=
设置SVN =
回声。 ++完成。


解决方案

从不在钩子使用TortoiseProc:它的GUI程序,不能在纯文本控制台上执行

 %SVN%\\ SVN了-q%SOURCE%

任何终端上就可以了(在TortoiseSVN安装添加CLI SVN的工具,如果你仍然有不是)

SVN书


  

如果在提交后钩子返回非零值,提交会
  不被中止,因为它已经完成。然而,任何
  标准错误的钩子将被编组回客户端,
  使它更容​​易诊断钩故障


我可以建议


  • 强制返回错误

  • 使用 SVN高达与标准输出重定向到stderr

  • 检查输出

This is my post-commit.bat hook script for SVN.

But my working copy is not updated automatically after the commit has happened.

However, if I manually open this file. Everything works as expected.

Please guide me.

@echo off

cls
echo == Initiating system instance variables...
echo. -- Setting the variables...

:: Here you need to make some changes to suit your system.
set SOURCE=C:\Users\subbarao.b\Desktop\SVNRepo
set SVN=C:\Program Files\TortoiseSVN\bin\

:: Unless you want to modify the script, this is enough.

echo. %SOURCE%
echo. %SVN%
echo. ++ Done setting variables.
echo.
echo == Updating source from SVN
echo. -- Running update...
"%SVN%\TortoiseProc.exe" /command:update /path:"%SOURCE%" /closeonend:2
echo. ++ Done.

echo. -- Cleaning up...
set SOURCE=
set SVN=
echo. ++ Done.

解决方案

Never use TortoiseProc in hooks: it's GUI program, which can not be executed in text-only console

%SVN%\svn up -q %SOURCE%

will work on any terminal (add CLI SVN-tools from TortoiseSVN installation, if you still haven't it)

From SVN Book

If the post-commit hook returns a nonzero exit status, the commit will not be aborted since it has already completed. However, anything that the hook printed to stderr will be marshalled back to the client, making it easier to diagnose hook failures

I can suggest

  • Forcibly return ERROR
  • Use svn up with redirection of stdout to stderr
  • Inspect output

这篇关于在邮政SVN更新提交 - [射击,但没有结果]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆