颠覆在线项目
我已经开始使用 subversion 来跟踪并能够逆转我们的网站与其开发和维护相关的更改。喜欢它提供的这种安全感!
我想知道是否有一个工具/方法能够自动同步“实时”网站和颠覆存储库。如果能够将错误补丁提交到存储库和实时版本,那就太好了(现在我通过 ftp 手动上传更正的文件,然后将其提交到 subversion 存储库)。
我确信它一定存在于某个地方,但是以什么名字存在?需要什么设置吗?
感谢您的反馈, 一个。
I've started using subversion to keep track - and be able to reverse - of our website changes related to its development and maintenance. Loving this feeling of security it provides!
I would like to know if there would be a tool / a way to be able to automate the synchronisation between the "live" website and the subversion repository. It would be great to be able to both commit a bug patch to the repository and to the live version (right now i manually upload via ftp the corrected file, then commit it to the subversion repository).
I'm sure this must exist somewhere, but under which name ? What set up does it need?
Thank you for your feedback,
A.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您可以创建一个提交后挂钩来导出您的存储库位于您的网络服务器目录的最新版本中:(
归功于 此论坛帖子)
将其保存在存储库的
hooks
目录中名为post-commit
的文件中,并使其可执行。如果存储库和网站不在同一台服务器上,您需要将其导出到临时目录中,然后通过 ftp 或 scp 推送它
编辑:还发现了可以完成这项工作的 perl 模块: SVN::Notify::Mirror
You can create a post-commit hook that will export your repository at the latest revision to your webserver directory:
(credits to this forum thread)
Save this in a file called
post-commit
, in thehooks
directory of your repository, and make it executable.If the repository and website are not on the same server, you'll want to export in a temporary directory, and then push it via ftp or scp
EDIT: found also this perl module that could do the job: SVN::Notify::Mirror
基本上你可以使用svn存储库挂钩来做到这一点,特别是
提交后
钩子。Basicly you could do it with svn repository hooks, especially the
post-commit
hook.查看。
svn update 在你的工作副本中。这可以每隔几分钟/小时完成一次,具体取决于您提交的频率。
checkout.
svn update in your working copy. This can be done every few mins/hours, depending on the frequency of your commits.