gpt4 book ai didi

ruby-on-rails - SVN 怪异 : Is It Possible It's Not My Fault

转载 作者:行者123 更新时间:2023-12-04 06:11:42 30 4
gpt4 key购买 nike

(我真的不在乎这是不是我的错,我更关心的是事情为什么会发生,当然...)

我在远程服务器上的 SVN 中有一个 Rails 站点。在我的本地副本上,我做了一个切换 (svn switch http://whatever/branch .),然后事情变得非常奇怪,网站无法正常工作。我终于找到了它,结果发现构建的那一部分(特别是 app/config 目录)指向了错误的分支。请注意:

  • 我从不使用 SVN 命令行以外的任何东西来切换
  • 我只在安装的根目录切换
  • 我总是以 root 身份切换 (sudo -s),并且我确信在整个树上正确设置了权限 (chmod -R 777)

关于工作目录的一部分如何最终指向错误的位置有什么想法吗?在我的内存中,这不是第一次工作目录的某些子目录指向错误的位置......为什么会发生这种情况?

最佳答案

有一整节关于switch problems在官方的 Subversion FAQ 中。它说:

In some cases where there are unversioned (and maybe ignored) items in the working copy, svn switch can get an error. The switch stops, leaving the working copy half-switched.

他们的建议是只从干净的工作副本切换。

另一件事是Mixed Revision Working Copies .

基本上这意味着您的工作副本中的文件可以(并且通常是)来自不同的修订。

这是 SVN Red Book 的内容不得不说这个(我强调):

For example, suppose you have a working copy entirely at revision 10. You edit the file foo.html and then perform an svn commit, which creates revision 15 in the repository. After the commit succeeds, many new users would expect the working copy to be entirely at revision 15, but that's not the case! Any number of changes might have happened in the repository between revisions 10 and 15. The client knows nothing of those changes in the repository, since you haven't yet run svn update, and svn commit doesn't pull down new changes. If, on the other hand, svn commit were to automatically download the newest changes, then it would be possible to set the entire working copy to revision 15—but then we'd be breaking the fundamental rule of “push” and “pull” remaining separate actions. Therefore the only safe thing the Subversion client can do is mark the one file—foo.html—as being at revision 15. The rest of the working copy remains at revision 10. Only by running svn update can the latest changes be downloaded, and the whole working copy be marked as revision 15.

关于ruby-on-rails - SVN 怪异 : Is It Possible It's Not My Fault,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/913003/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com