SVN:状态“相对于其父级切换"是什么?意思? [英] SVN: What does the status "switched relative to its parent" mean?

查看:28
本文介绍了SVN:状态“相对于其父级切换"是什么?意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试从 SVN 存储库更新我们的实时站点.据我所知,回购中没有任何内容.本身应该与工作副本目录中的任何内容冲突.但是当我尝试在公共根目录上svn up"时,出现以下错误:

svn: REPORT 请求在/svn/oursite/!svn/vcc/default"上失败svn:存储库中不存在工作副本路径app"

当我在 docroot 上运行svn status"时,我看到以下内容:

docroot$ svn st -N+S 应用+S 下载+S index.php(等等.)

根据文档,S 标志指示项目是否相对于其父项进行切换.这到底意味着什么,我该怎么做才能解决这个问题?

我应该提到我是唯一一个使用过 SVN 存储库的人.我一整天都在处理它,试图在我四处移动时解决一个又一个的腐败问题.

(SVN 很棒,但它确实很脆弱……如果你只是看错了,它似乎会崩溃!)

解决方案

在您运行 svn status 所在的文件夹中,运行以下命令:

svn 信息应用

这将显示应用文件夹的 svn 元数据指向的 URL.根据父文件夹的 URL,您可能会看到它指向另一个位置,而不是您期望的位置.

然后您可以使用 svn switch 将每个切换的文件夹指向正确的 URL,或者简单地使用 rm -rf 删除每个切换的文件夹,然后执行 <代码>svn 更新.

update 重读问题后:Scott 是对的,他说当你执行 svn update 时,切换的文件夹不应该导致错误.

您的工作副本出现问题的原因是您在没有使用 svn mv 命令的情况下移动或重命名文件夹.这是一个经典的 SVN 新手错误;我参与了培训新的 SVN 用户,我已经看到了很多.

在这种错误操作之后修复工作副本是相当困难的.修复它的最佳方法通常是重新结帐.SVN 的未来版本将集中化 Subversion 1.7 现在具有 集中 .svn 元数据,减少出现此类错误的机会.>

I'm trying to update our live site from the SVN repository. As far as I know, there's nothing in the repos. itself that should conflict with anything in the working copy dir. But when I try to "svn up" on the public root directory, I get the following error:

svn: REPORT request failed on '/svn/oursite/!svn/vcc/default'
svn: Working copy path 'app' does not exist in repository

When I run "svn status" on the docroot, I see the following:

docroot$ svn st -N
   +S  app
   +S  downloads
   +S  index.php
   (etc.)

According to the docs, the S flag indicates whether the item is switched relative to its parent. What does that even mean, and what can I do to fix this?

EDIT: I should mention that I'm the only one who has worked with the SVN repository. I've been working with it all day, trying to defeat one corruption issue after another as I move things around.

(SVN is great, but it sure is fragile... Seems to break if you just glance at it wrong!)

解决方案

In the same folder as the one where you ran svn status, run the following command:

svn info app

This will show you at which URL the svn metadata of the app folder is pointing. You'll probably see that it is pointing to another location compared to the one you'd expect based on the URL for the parent folder.

You can then either use svn switch to point each switched folder back at the correct URL, or simply delete each switched folder with rm -rf and then do a svn update.

update after rereading question: Scott is right when he says that switched folders should not cause errors when you do a svn update.

The reason you experience problems with your working copy is because you move around or rename folders without using the svn mv command. This is a classic SVN newbie mistake; I've been involved in training new SVN users and I've seen this alot.

It is quite hard to repair a working copy after such erroneous manipulations. The best way to fix it is typically to just do a fresh checkout. Future versions of SVN will centralize Subversion 1.7 has now centralized the .svn metadata, reducing the opportunity for such mistakes.

这篇关于SVN:状态“相对于其父级切换"是什么?意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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