使用冒号后 SVN 存储库在 Windows 上损坏 [英] SVN repository broken on Windows after using colon

查看:33
本文介绍了使用冒号后 SVN 存储库在 Windows 上损坏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们在多操作系统环境中使用 svn.我犯了一个错误,提交了一个包含冒号的文件,即 bar:foobaa:foo.在 linux 下这当然不是问题,但在 Windows 下 : 不是文件系统允许的字符.在意识到我的错误后,使用 svn mv 重命名了来自 linux 的文件.

问题是当检出包含 : 的版本时,Windows 上的 svn 会卡住.考虑以下过程:

  1. 签出存储库的最新状态(即使用固定文件名)

  2. 检查包含带冒号的文件名的提交.这会导致以下结果:

<块引用>

添加了 foo

跳过阻碍工作副本 foo

警告!一个或多个文件处于冲突状态.`

  1. 现在尝试使用 svn co 返回到更正后的版本会出现错误:

<块引用>

错误 'bar:foo' 不是目录文件夹中的有效文件名`

  1. 没用再试svn co:

<块引用>

错误 XML 响应包含无效的 XML

错误格式错误的 XML:找不到元素`

现在存储库卡住了,即无法再结帐,因为您将始终收到最后一个错误.请注意,这会创建一个不在存储库中的文件 foo.我试图删除文件和/或使用 svn cleanup.但是没有任何成功,因为文件总是在 svn 尝试执行实际更新之前恢复.

有没有办法修复本地svn?或者是不惜一切代价进行新检出并避免在 Windows 下受影响的修订的唯一方法?

解决方案

所以我想出了一种解决方法.基本思想是更新到最新版本,但只更新目录本身,而不更新目录中的文件.这样,所有文件都被删除,而不是尝试更新/恢复.现在该目录位于正确的修订版上,我们也可以获取当前修订版的其余文件.

使用 Tortois svn:

  1. 转到受影响的目录

  2. 更新到修订版...

    1. 选择最新版本

    2. 选择更新深度仅此项目"

    3. 按确定

  3. 更新到修订版...

    1. 选择最新版本

    2. 选择完全递归"更新深度

    3. 按确定

we are using svn in a multi OS environment. I made the mistake to commit a file containing a colon, i.e. bar:foo and baa:foo. Under linux this is ofcourse not a problem but under Windows : is not an allowed character for the file system. After realizing my mistake a renamed the files from linux using svn mv.

The problem is that svn on Windows is stuck when ever a version containing the : is checked out. Consider the following procedure:

  1. checkout the repository on its latest state (i.e. with fixed filenames)

  2. Checkout a commit containing the filenames with colon. This leads to the following:

Added foo

Skipped obstructing working copy foo

Warning! One or more files are in a conflicting state.`

  1. Now trying to go back to the corrected version with svn co gives the error:

Error 'bar:foo' is not a valid filename in directory Folder`

  1. Didn't work try again svn co:

Error The XML response contains invalid XML

Error Malformed XML: no element found`

Now the repository is stuck, i.e. no more checkout is possible as you will always get the last error. Note that this creates a file foo which is not in the repository. I tried to remove the file and/or use svn cleanup. But without any success as the file is always restored before svn tries to perform the actuall update.

Is there a way to fix the local svn? Or is the only way to make a new checkout and to avoid the affected revisions under Windows at all cost?

解决方案

So I figured out a way of fixing it. The basic idea is to update to the latest revison but only the directory itself, but not the files within the directory. Thisway all files are removed and not tried to be updated/ restored. Now the directory is on the right revision and we can get the remaining files of the current revision as well.

Using tortois svn:

  1. Go to the affected diretcotry

  2. Update to revision...

    1. Select latest revision

    2. Select Update Depth "only this item"

    3. Press Ok

  3. Update to revision...

    1. Select latest revision

    2. Select Update Depth "Fully recursive"

    3. Press Ok

这篇关于使用冒号后 SVN 存储库在 Windows 上损坏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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