Subversion部分导出 [英] Subversion Partial Export

查看:114
本文介绍了Subversion部分导出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有点有趣的发展情况。客户端和部署服务器位于防火墙内,无需访问Subversion服务器。但开发人员在防火墙之外,可以使用Subversion服务器。现在我已经做出的解决方案是更新我的本地代码副本,然后使用UnleashIT拉出最近更新的文件。



问题是如何从Subversion获取更新的文件,以便它们可以通过防火墙物理传输并放置在部署服务器上。



我不担心尝试更改防火墙设置或试图找出从防火墙内部到达Subversion服务器的更简单的方法。我只想从最近更改的文件的存储库获得部分导出的方式。



有没有其他建议?



答案发现:除了我标记为答案的答案,我还发现以下这里可以从TortoiseSVN这样做:



http://svn.haxx.se/tsvn /archive-2006-08/0051.shtml

  *选择两个版本
*点击比较修订版本
*选择列表中的所有文件
*右键单击,选择导出到...


解决方案

我发现 rsync 对同步多个系统中的目录树非常有用。如果您从开发工作站访问您的服务器,您可以定期在本地检查代码并运行rsync,这将仅将已更改的文件传输到服务器。



(这假设你的开发工作站上是一个类Unix环境,Cygwin可以正常工作。)

  cd deploy 
svn update
rsync -a。服务器:webdir /

您的问题听起来像您的开发实际上没有直接的网络访问工作站到您的服务器,您真正寻找的是一种让Subversion告诉您哪些文件已更改的方法。 svn导出支持一个参数,让您只检查在特定修订版本之间更改的文件。从svn帮助:

  -r [--revision] arg:ARG(一些命令也采用ARG1:ARG2范围)
修订参数可以是以下之一:
NUMBER版本号
'{'DATE'}'日期开始时修改
'HEAD'最新版本
' BASE'项目的工作副本
'COMMITTED'最后一次提交在BASE
'PREV'修订之前在COMMITTED

您需要跟踪您复制到服务器的最新版本。假设它是SVN修订版xxxx:

  svn export -r xxxx:HEAD http:// svn / 

然后,只需将部署目录的内容复制到现有文件之上的服务器上。 p>

这不会处理已删除的文件,在某些环境中可能会出现问题。


I have somewhat interesting development situation. The client and deployment server are inside a firewall without access to the Subversion server. But the developers are outside the firewall and are able to use the Subversion server. Right now the solution I have worked out is to update my local copy of the code and then pull out the most recently updated files using UnleashIT.

The question is how to get just the updated files out of Subversion so that they can be physically transported through the firewall and put on the deployment server.

I'm not worried about trying to change the firewall setup or trying to figure out an easier way to get to the Subversion server from inside the firewall. I'm just interested in a way to get a partial export from the repository of the most recently changed files.

Are there any other suggestions?

Answer found: In addition to the answer I marked as Answer, I've also found the following here to be able to do this from TortoiseSVN:

from http://svn.haxx.se/tsvn/archive-2006-08/0051.shtml

* select the two revisions
* right-click, "compare revisions"
* select all files in the list
* right-click, choose "export to..." 

解决方案

I've found rsync extremely useful for synchronizing directory trees across multiple systems. If you have shell access to your server from a development workstation, you can regularly check out code locally and run rsync, which will transfer only the files that have changed to the server.

(This assumes a Unix-like environment on your development workstations. Cygwin will work fine.)

cd deploy
svn update
rsync -a . server:webdir/

Your question sounds like you don't actually have any direct network access from your development workstations to your server, and what you're really looking for is a way to get Subversion to tell you which files have changed. svn export supports an argument to let you check out only the files that changed between particular revisions. From the svn help:

  -r [--revision] arg      : ARG (some commands also take ARG1:ARG2 range)
                             A revision argument can be one of:
                                NUMBER       revision number
                                '{' DATE '}' revision at start of the date
                                'HEAD'       latest in repository
                                'BASE'       base rev of item's working copy
                                'COMMITTED'  last commit at or before BASE
                                'PREV'       revision just before COMMITTED

You'll need to keep track of what the latest revision you copied to the server. Assuming it's SVN revision xxxx:

svn export -r xxxx:HEAD http://svn/

Then simply copy the contents of the deploy directory to your server on top of the existing files.

This won't handle deleted files, which may prove problematic in some environments.

这篇关于Subversion部分导出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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