SVN:整个存储库更新和单文件更新之间的区别?

发布于 2024-09-10 15:40:59 字数 566 浏览 10 评论 0原文

我们有一个提交钩子,每次提交完成时都会在远程工作副本上运行“svn update”。用户希望看到提交的更改立即反映在此远程副本中。

用户对在整个工作副本上运行“svn update”的性能非常不满意,因此我被要求更改挂钩以使用“svnlookchanged”来查找更新的文件,然后仅“svn update”那些更新的文件。

这种方法的性能得到了非常积极的评价,但这使工作副本处于奇怪/损坏的状态 - 工作副本获取更新,但认为它具有从存储库中提取的单例更新文件的本地未版本化副本。

我一直在尝试了解单例更新和整个存储库更新之间的区别,以找出发生这种情况的原因。以这种方式进行更新对我来说似乎不是一个好的做法,特别是考虑到这些问题,但我对 SVN 幕后发生的事情了解不够,无法阐明原因,特别是“svn update”和“svn update FILE”之间的区别'。

从 SVN 的角度来看,在存储库上运行“svn update”与在文件上运行“svn update”有何不同?

这是一个不好的做法吗?基于父目录的更新是“足够好”的做法吗?

否则,我应该如何在每个文件的基础上进行 SVN 更新以避免这种不一致的工作副本问题?

We have a commit hook that runs an 'svn update' on a remote working copy every time a commit finishes. Users want to see committed changes immediately reflected in this remote copy.

Users are extremely unhappy with the performance of running 'svn update' on the whole working copy, so I was asked to change the hook to use 'svnlook changed' to find updated files and then 'svn update' those updated files ONLY.

The performance of this method was received very positively, but this has put the working copy in a weird/broken state - the working copy gets the updates, but thinks it has local unversioned copies of the singleton-update files pulled from the repository.

I've been trying to understand the difference between a singleton update and a whole repository update to figure out why this is happening. Doing updates this way does not seem like good practice to me, especially given these issues, but I don't know enough about what's happening behind the scenes in SVN to articulate why, specifically the differences between 'svn update' and 'svn update FILE'.

What is different from SVN's perspective between running 'svn update' on the repository vs. on a file?

Is this a bad practice? Would parent directory-based updates be "good enough" practice?

Otherwise, how should I do SVN updates on a per-file basis to avoid this inconsistent working copy problem?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

剪不断理还乱 2024-09-17 15:40:59

我建议更新父目录而不仅仅是文件。在调用更新之前还要对目录执行svn cleanup,这应该有助于解决损坏的签出问题。

I would suggest updating the parent directory instead of just the file. Also perform an svn cleanup on the directory before calling an update, this should help with your corrupted checkout issues.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文