无法升级SVN工作副本 [英] Unable to upgrade SVN working copy

查看:51
本文介绍了无法升级SVN工作副本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个非常非常大的 svn 存储库.当我尝试使用它(提交、更新等)时,它说有锁.

I have a very very large svn repo. When I try to use it (commit, update, etc.) it says there are locks.

当我运行 'svn cleanup' 时,它说工作副本太旧,我需要升级它.

When I run 'svn cleanup', it says that the working copy is too old and I need to upgrade it.

当我运行 'svn upgrade' 时,它会运行,但什么也没说.

When I run 'svn upgrade', it runs, but doesn't say anything.

我还在 repo 上运行了svnadmin upgrade",以防万一.

I also ran 'svnadmin upgrade' on the repo, just in case.

我安装了最新的 TortoiseSVN.

I have the latest TortoiseSVN installed.

通常,如果我有 SVN 怪癖,我会将文件移出、更新、移回文件,但正如我之前提到的,这是一个非常大的存储库.

Normally, if I had SVN weirdness, I'd move the files out, update, move the files back, but as I mentioned earlier, this is a very LARGE repo.

任何帮助将不胜感激.

谢谢!

具体消息:

>svn update
svn: E155004: Run 'svn cleanup' to remove locks (type 'svn help cleanup' for details)
svn: E155004: Working copy '*****' locked.
svn: E155004: '*****' is already locked.

>svn cleanup
svn: E155036: Please see the 'svn upgrade' command
svn: E155036: The working copy at '*****' is too old (format 29) to work with client version '1.8.1 (r1503906)' (expects format 31). You need to upgrade the working copy first.

>svn upgrade

>

更新 1:我安装了 1.7.X 客户端并尝试运行清理.它抱怨说,由于某种原因,这个 repo 不是工作副本.我尝试使用相同的 1.7.X 客户端进行更新并收到以下消息:

Update 1: I installed a 1.7.X client and tried to run a cleanup. It complained that the repo wasn't a working copy, for some reason. I tried an update with the same 1.7.X client and got the following message:

>"c:\Program Files\SlikSvn\bin\svn.exe" update
svn: E155021: This client is too old to work with the working copy at '*****' (format 31).
You need to get a newer Subversion client. For more details, see http://subversion.apache.org/faq.html#working-copy-format-change

所以,这个客户认为 repo 是格式 31.tortoisesvn 认为它是格式 29.现在我更困惑了.

So, this client things the repo is format 31. The tortoisesvn thinks it is format 29. Now I'm more confused.

更新 2:回复@David W

Update 2: Response to @David W

Is this about a working copy or the repository?

工作副本.虽然我也尝试在 repo 上升级 svnadmin.但是,我使用的 svnadmin 是 1.8.1.我只是尝试使用 TortoiseSVN one (1.8.10) 升级 repo,但这并没有解决问题.

Working copy. Though I tried svnadmin upgrade on the repo as well. However, the svnadmin I used was the 1.8.1. I just tried to upgrade the repo with the TortoiseSVN one (1.8.10), but that didn't fix the issue.

is this about a file that's locked because someone locked it, or because your working directory is locked due to an incomplete

我是唯一一个使用 repo 的人,所以我知道没有其他人锁定它.可能是因为操作不完整.

I'm the only one using the repo, so I know no one else locked it. Its probably due to an incomplete op.

我使用 1.8.10 运行 svn status,但没有任何东西带有K".有一些带有L"的文件,还有一些带有?"的文件.列出的所有项目都是目录,而不是文件,但标有?"的除外.

I ran svn status with 1.8.10, and nothing had a 'K'. There were some files with an 'L', and one with a '?'. All items listed were directories, not files, with the exception of the one marked with a '?'.

如果我运行'svn lock --force dirname',它会响应该特定节点不是文件".当我在标有?"的文件上运行它时,它响应未找到该节点".

If I ran an 'svn lock --force dirname', it would respond that that specific node "is not a file". When I ran it on the file marked with a '?', it responded that that node 'was not found'.

Then, there is a locked working directory because of an incomplete operation...

是的,你叫它.这就是为什么所有的东西都标有L",我猜.

Yep, you called it. That is why all the things are marked with an 'L', I gather.

当我运行清理 (1.8.10) 时,它给了我我在初始问题中报告的相同错误(格式 29 对于此格式 31 客户端来说太旧了).

When I ran a cleanup (1.8.10) it gave me the same error I reported in my intiial question (format 29 too old for this format 31 client).

Remember that you can always delete a working directory and create a new one

是的.如果我删除工作副本中的任何目录并点击更新,它会抱怨它被锁定.我无法清除锁定,因为格式不匹配.理论上我可以重新签出整个 repo,然后将内容复制回来,但 repo 是 12GB(210,000 个文件).

Yep. If I delete any directory in the working copy and hit update, it complains that it is locked. I can't clear the lock, 'cause of the format mismatch. I can theoretically just re-checkout the entire repo, then copy things back, but the repo is 12GB (210,000 files).

Be careful about mixing up Subversion clients

所以,我不知道我有两个客户端,但我只使用 TortoiseSVN (1.8.10).我今天才发现我在尝试排除故障时有两个.

So, I was unaware that I had two clients, but I only only only use TortoiseSVN (1.8.10). I only discovered today that I had two when I was trying to troubleshoot.

* 更新 3:解决方案 *使用@David W 的提示,这是我解决问题的方法:1) 备份我的 .svn 文件夹2) 从 https://github.com/sqlitebrowser/sqlitebrowser/releases 下载了一个 SQLite 编辑器3) 打开我的 wc.db 文件并浏览 WC_LOCK 表.该表中有 1 个条目,我已将其删除.4) 尝试使用 TortoiseSVN (1.8.10) 运行清理,它之前抱怨过锁.它终于奏效了!5) 尝试在我的 repo 中运行命令(更新、提交等),一切都很愉快.

* UPDATE 3: RESOLUTION * Using @David W's tips, here is how I fixed the problem: 1) Backed up my .svn folder 2) Downloaded an SQLite editor from https://github.com/sqlitebrowser/sqlitebrowser/releases 3) Opened up my wc.db file and browsed the WC_LOCK table. There was 1 entry in that table, which I removed. 4) Tried running a cleanup using TortoiseSVN (1.8.10), which previously complained about locks. It finally worked! 5) Tried running commands in my repo (update, commit, etc.), and everything was happy.

感谢所有帮助过我的人,尤其是@David W 没有放弃我.

Thank you to everyone who helped, especially @David W for not giving up on me.

推荐答案

我有一个非常非常大的 svn 存储库.当我尝试使用它(提交、更新等)时,它说有锁.

I have a very very large svn repo. When I try to use it (commit, update, etc.) it says there are locks.

这是关于工作副本还是存储库?两种不同的东西.此外,这是关于文件被锁定是因为有人锁定,还是因为您的工作目录因不完整而被锁定

Is this about a working copy or the repository? Two different things. Also, is this about a file that's locked because someone locked it, or because your working directory is locked due to an incomplete

你可以对一个文件设置一个来阻止你提交.从命令行,您可以执行 svn status 并查看锁定文件旁边的 K.然后您可以使用 svn lock --force窃取那个锁,并检查您的更改.(只要存储库中没有阻止您窃取锁的钩子即可).

You can have a lock on a file that prevents you from doing a commit. From the command line, you can do a svn status and see the K next to the locked file. You can then use svn lock --force to steal that lock, and check in your changes. (As long as there's no hook in the repository that prevents you from stealing locks).

然后,由于操作不完整,有一个锁定的工作目录.在这种情况下,当您执行 svn status 时,您将看到一个 L.在这种情况下,您通常可以在该工作副本的根目录(.svn 文件夹所在的位置)执行 svn cleanup.

Then, there is a locked working directory because of an incomplete operation. In this case, you'll see an L when you do a svn status. In that case, you can usually do a svn cleanup in the root directory of that working copy (Where the .svn folder is located.)

请记住,您可以始终删除工作目录并创建一个新目录.小心混淆 Subversion 客户端.曾几何时,这似乎并不重要,但在 Revision 1.6、1.7、1.8 和 1.9 中,工作副本的结构发生了变化,可能与运行其他版本的客户端不兼容.

Remember that you can always delete a working directory and create a new one. Be careful about mixing up Subversion clients. At one time, it didn't seem to matter that much, but in Revision 1.6, 1.7, 1.8, and 1.9, the structure of the working copy has changed and may not be compatible with clients running other revisions.

是的.如果我删除工作副本中的任何目录并点击更新,它会抱怨它被锁定.我无法清除锁定,因为格式不匹配.理论上我可以重新签出整个 repo,然后将内容复制回来,但 repo 是 12GB(210,000 个文件).

Yep. If I delete any directory in the working copy and hit update, it complains that it is locked. I can't clear the lock, 'cause of the format mismatch. I can theoretically just re-checkout the entire repo, then copy things back, but the repo is 12GB (210,000 files).

删除目录然后执行 svn up 并不能解决锁定问题.我的意思是删除整个工作目录,并重做一个 svn co.您不必签出整个 repo.你只需要检查你需要什么.您需要所有 21 万个文件吗?我怀疑:

Deleting a directory and then doing a svn up doesn't clean up the lock issue. I meant to delete the entire working directory, and redoing a svn co. You don't have to checkout the entire repo. You only have to check out what you need. Do you need all 210 thousand files? I doubt it:

$ svn co http://server/repo            # NOOOO!
$ svn co http://server/repo/trunk      # A bit better, but do you need all
                                       # the projects under Trunk?
$ svn co http://server/repo/trunk/foo  # Now, I'm just checking out foo
$ svn co http://server/repo/trunk/bar  # Now, I'm just checking out bar

这会检查两个工作目录:一个用于 foo,另一个用于 bar.

This checks out two working directories: One for foo and one for bar.

如果你真的,真的想检查整个行李箱,使用 --depth 来稀疏地检查你需要的东西:

If you really, really want to checkout the entire trunk, use the --depth to sparsely checkout what you need:

# Checking out trunk, but only getting the project directories
$ svn co http://server/repo/trunk --depth=immediates
$ svn up --set-depth=infinity foo
$ svn up --set-depth=infinity bar

理论上我在这里检查了整个主干,但我只得到空的主项目目录.我只从项目foobar 获取文件.但是,foobar 共享 一个工作目录.假设我开始对 foo 进行长时间更新,然后我转到 bar 并尝试提交.我会收到工作目录被锁定的警告.我无法在同一个工作目录上执行两个单独的 Subversion 命令,即使它们位于该工作目录的不同部分.

Here I am in theory checking out the entire trunk, but I'm only getting empty master project directories. I am only getting files from projectsfoo and bar. However, foo and bar share a working directory. Let's say I start a long update on foo, then I go to bar and try to commit. I'll get a warning that the working directory is locked. I can't do two separate Subversion commands on the same working directory even if they are in different sections of that working directory.

所以,我不知道我有两个客户端,但我只使用 TortoiseSVN (1.8.10).我今天才发现我在尝试排除故障时有两个.

So, I was unaware that I had two clients, but I only only only use TortoiseSVN (1.8.10). I only discovered today that I had two when I was trying to troubleshoot.

如果您安装 Tortoise,您还可以安装 Subversion 命令行客户端,这是一个可选安装.我强烈推荐它!不要使用从其他地方下载的命令行客户端(比如 SlikSVN 或 CollabeNet.并不是这些客户端不好.而是你应该使用你的 TortoiseSVN 版本附带的命令行客户端,以保证两者之间的一些奇偶校验Subversion 客户端.

If you install Tortoise, you can also install the Subversion command line client which is an optional install. I highly recommend it! Don't use a command line client downloaded from elsewhere (like SlikSVN or CollabeNet. It's not that these clients are bad. It's that you should use the command line client that comes with your version of TortoiseSVN in order to guarantee some parity between the two Subversion clients.

很容易混淆这些.你不应该在你的工作目录上使用 svnadmin 命令.svnadmin 用于服务器.您遇到的问题是严格的客户问题.

It's very easy to get these confused. You shouldn't be using svnadmin commands on your working directory. The svnadmin is for the server. The issue you have is strictly client.

随着 Subversion 从 1.6 到 1.7 到 1.8 再到 1.9,upgrade 会将您的工作目录升级到新格式.完成后,您将无法返回到旧格式.您升级到 1.8 格式,1.7 和 1.6 客户端将不再工作.

As Subversion moved from 1.6 to 1.7 to 1.8 and now to 1.9, the upgrade will upgrade your working directory to the new format. Once done, you cannot go back to the older format. You upgrade to the 1.8 format, 1.7 and 1.6 clients will no longer work.

清理是为了帮助移除由于 Subversion 客户端命令不完整造成的锁.

Cleanup is to help remove locks due to incomplete Subversion client commands.

这篇关于无法升级SVN工作副本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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