如何在不访问 svn 服务器的情况下应用更改
我们使用 svn 来开发大型 Web 应用程序,并且定期更新生产环境。生产服务器无法访问 svn(出于安全原因)。
自上次生产版本发布以来,将更改推送到新版本的最佳方法是什么?我们希望避免每次都重新创建整个网站,因为它非常大。
We are using svn for development of a large web application, and we do periodic updates to production. The production server does not have access to svn (for security reasons).
What is the best way to push the changes since the last production release for a new release? We would like to avoid re-creating the whole site each time, since it is very large.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好吧,让我试一试。您可以解析 SVN update 命令输出并生成仅复制已更改文件的复制指令吗?
http://svnbook.red-bean.com/en/1.1/ch03s05。 html
或者,如果您更喜欢半手动解决方案,您可以使用 diff 工具,例如 WinMerge 或 Araxis Merge 同步两个目录。
编辑:
我认为“svn update”不会完全起作用,但我决定的是:
我编写了一个脚本来捕获“切换”的输出。它将 U 和 A 操作转换为“添加”到 zip 存档。它将 D 操作翻译为要在生产服务器上执行的删除命令。在生产服务器上,我们只需解压存档并运行删除命令即可。
Well let me give a shot. You can parse the SVN update command output and generate copy instructions that only copy the files that were changed?
http://svnbook.red-bean.com/en/1.1/ch03s05.html
Or if you prefer a semi-manual solution you can use a diff tool like WinMerge or Araxis Merge to sync both directories.
EDIT:
I don't think "svn update" will work exactly, but what I settled on was:
I wrote a script to capture the output of the "switch". It translates U and A operations to "adds" to a zip archive. It translates D operations to delete commands to be executed on the production server. On the production server, we just need to unzip the archive and run the delete commands.
签出玻璃墙一侧的目录,使其可以从生产服务器访问。使用某种 diff/sync 实用程序来同步两者,减去 _svn 文件夹或任何其他会污染生产环境的文件。
或者使用包含“自 mm/dd/yyyy 以来的更改”的文件的 zip(或其他存档),并将其应用到生产目录。
Do a checkout to a directory on your side of the glass wall, make it accessible from the production server. Use some sort of diff/sync utility to synchronize the two, minus the _svn folders or any other files that would contaiminate the production environment.
Or use a zip (or other archive) of files with "changes since mm/dd/yyyy", and apply it to the prodution directory.