SVN:我可以将文件子集复制到新标签吗?
在我的存储库主干中,我有一个目录 unit-tests
,我希望将其排除在发布标签之外。 我一直在做的是将主干复制到新标签,然后删除单元测试
。 这样可以吗?感觉不对,因为需要两次修订来标记每个版本。 有没有办法从svn副本中排除目录?
例如我有:
/trunk/unit-tests
/trunk/dir1
/trunk/file1
/trunk/file2
并且我想创建:
/tags/release_123/dir1
/tags/release_123/file1
/tags/release_123/file2
我通常使用Tortoise / Eclipse客户端,但我可以cli它如果需要的话。
In my repo trunk I have a directory unit-tests
that I want to keep out of my release tags. What I've been doing is copying trunk to a new tag, then deleting unit-tests
. Is this OK? It feels wrong because it takes two revisions to tag every release. Is there a way to exclude a directory from the svn copy?
E.g. I have:
/trunk/unit-tests
/trunk/dir1
/trunk/file1
/trunk/file2
And I want to create:
/tags/release_123/dir1
/tags/release_123/file1
/tags/release_123/file2
I generally use Tortoise/Eclipse clients, but I could cli it if need be.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为你不能。
但为什么你仍然需要删除单元测试目录呢?
它在存储库中不占用额外的空间,事实上,如果删除它,它会占用更多空间(因为额外的提交)。
如果您担心标记的签出时间太长/太大,您可以选择不签出单元测试目录。
I don't think you can.
But why do you need to delete the unit-test directory anyway?
It takes up no extra space in the repository, in fact, it takes up more space if you delete it (because of the extra commit).
If you are worried that a check-out of the tag takes too long / gets too big, you can choose to not check-out the unit-test directory.
您可以使用 subversion 提供的 svnmucc 程序来执行此操作(自 SVN1.5 起包含在 Windows 版本中)
这个小工具会将多个 svnaction 收集到一次提交中。 但是您需要先创建目标文件夹。 不可能在单个事务中创建文件夹并复制其中的内容:这里是一个示例:
您还可以使用 perl/python/ruby 绑定或 svnkit(java) 来完成此任务,但我无法为此提供源代码。 。
You can do this by using the svnmucc program provided by subversion (included in windows builds since SVN1.5)
This small tool will collect multiple svnactions into a single commit. however you need to create the destination folder before. It is not possible to create a folder and copy content inside in a single transaction: here a sample:
You can also use the perl/python/ruby bindings or svnkit(java) to accomplish this task, but I cannot provide sourcecode for this..