svn 与 svn:externals 合并会导致大量添加 svn:merge-info 属性 - 有什么解决方案吗?
如果您有一个带有 svn:external 链接的目录(我们在工作中广泛使用),那么每当您在分支之间合并该目录时,目录中的每个文件都会获得一个新的 svn:merge-info 属性。
我猜这是因为外部链接没有被合并更改,所以 svn 正在计算它自己的子树(与 为什么 svn 会合并一个没有更改的分支会导致未更改的文件修改 svn:mergeinfo 属性)。
这会导致实际更改被隐藏在所有合并信息属性更改中,从而使更改集变得很大且几乎不可读。 (我们有一个具有足够合并历史和外部的分支,合并一行更改可能会导致 500Kb 的差异)。
到目前为止,我们唯一能做的就是在提交之前从带有 svn:external links 的子树中删除合并属性。这可以防止使用 --reintegrate 并意味着我们无法跟踪真正的子树合并(如果发生)。
有人有更好的解决方案吗?
If you have a directory with an svn:external link it in (which we use extensively at work), then whenever you merge that directory between branches, every file in the directory gets a new svn:merge-info property.
I'm guessing it's because the external link is not being changed by the merge so svn is counting it it's own subtree (related to, but not the same problem as Why would svn merge of a branch with no changes causes untouched files to modify svn:mergeinfo property).
This results in the actual change being buried in all the merge info property changes, making the changeset both large and almost unreadable. (We have a branch with enough merge history and externals that merging a one line change can result in a 500Kb diff).
So far the only thing we can do is delete the merge properties from the subtrees with svn:external links before committing. This prevents using --reintegrate and means we can't track real subtree merges if they happen.
Does anyone have any better solutions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
svn:merge-info 不适合阅读,但我理解你的问题。
一种解决方案是升级到 1.7(服务器和客户端)。 1.7 中对 merge-info 所做的一些工作可能会对您有所帮助。
听起来您已经了解合并信息,但无论如何这里还有一些额外的信息。
节点(文件或目录)上的 merge-info 是从其父级(目录)继承的,一直到工作副本,然后进一步到达存储库。 svn 尝试仅在需要的节点(即与其父节点不同的节点)上写入合并信息。
为了防止节点上出现合并信息,请确保合并尽可能靠近存储库根目录,并且如果发生了任何其他合并,请先尝试从上层目录合并这些漏洞。这不会导致任何变化,但会填补合并信息中的空白,使得 Mergeinfo消除更有效。
我发现某些版本的 svn 在进行合并时无法按预期工作。 1.6.6(ubuntu 10.04 的那个)在进行部分合并时效果不佳。
svn:merge-info isn't meant to be read but I understand your problem.
One solution could be to upgrade to 1.7 (both server and client). There is some work done on merge-info in 1.7 that might help you.
It sounds like you already understand merge-info but here is some extra information anyway.
merge-info on a node (file or directory) is inherited from it parent (director) all the way through your working copy and then further up to the repository. svn tries to write merge-info only on nodes where it is needed ie where it differs from it's parent.
To prevent merge-info on nodes make sure to merge as close as possible to the repository root and if any other merges has occured before try to merge in those holes from a upper directory. That would cause no changes but fill in the gaps in the merge-info making Mergeinfo Elision more effective.
I've found that some versions of svn doesn't work as intended when doing merges. 1.6.6 (the one ubuntu 10.04 have) doesn't work very well when doing partial merges.