如何防止TortoiseSVN数据库锁定? [英] How can I prevent TortoiseSVN database locking up?

查看:64
本文介绍了如何防止TortoiseSVN数据库锁定?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一台装有最新TortoiseSVN版本(1.11.0 x64)的Windows 7 PC.几乎每次我要将更改提交到服务器时,都会出现以下错误:

I have a Windows 7 PC with the latest TortoiseSVN version (1.11.0 x64). Almost every time I want to commit changes to the server, I get the following error:

Commit failed (details follow):
Failed to load properties: sqlite[S5]: database is locked
Error unlocking locked dirs (details follow): sqlite[S5]: database is locked

Another process is blocking the working copy database, or the underlying filesystem does
not support file locking; if the working copy is on a network filesystem, make sure file
locking has been enabled on the file server.

修复起来很容易-我只要转到项目根文件夹,进行SVN清理,然后提交就可以正常工作了.但是,如果我要在几分钟后再次提交,则很可能再次失败,并迫使我再次进行清理.真的很烦人.

It's easy to fix - I just go to the project root folder, do an SVN cleanup, and then the commit works fine. However, if I want to commit again a few minutes after that, it will most likely fail again and force me to do another cleanup. It gets really annoying.

有什么办法可以防止这些锁定的发生?我可以在TortoiseSVN上进行任何更改的设置吗?

Is there any way I can prevent these locks from happening? Any settings I can change on TortoiseSVN, or something?

更多细节:

  • 我的SVN项目和TortoiseSVN本身都放置在本地HDD(无网络文件系统)中,并且它们的文件夹已从防病毒软件中排除.
  • 工作副本文件夹不是网络共享的(也不是本地共享的,我是该PC上的唯一用户).
  • 我也没有Dropbox,Google云端硬盘或任何其他同步文件夹的云软件.
  • 它特定于TortoiseSVN,当我从Eclipse提交更改时,从未遇到此错误.
  • 我真的不认为这是一个TortoiseSVN错误,我最近从1.9.6版本更新到1.11.0,并且都存在相同的问题,如果这确实是一个错误,则肯定会得到修复...?:)
  • 我是当前正在处理项目的唯一开发人员(这不是我的本地数据库过时或存在冲突的问题.

推荐答案

编辑:问题实际上并不是Eclipse本身引起的.它要么是Subversive插件,要么是SVNKit连接器.我已切换到Subclipse和JavaHL,问题已完全消失.我没有尝试使用Subclipse + SVNKit,也没有尝试使用Subversive + JavaHL,我想这些组合中的一种也可以解决问题,而另一种则不能.

Edit: the problem wasn't actually caused by Eclipse itself. It was either the Subversive plugin, or the SVNKit connector. I've switched to Subclipse and JavaHL, and the problem has completely disappeared. I haven't tried with Subclipse+SVNKit, nor Subversive+JavaHL, I guess one of these combinations will solve the problem too, and the other won't.

问题似乎是由Eclipse引起的.我们通常会像下面这样构造SVN项目:

It seems that the problem is caused by Eclipse. We usually structure our SVN projects like this:

/trunk
  /docs
  /etc
  /scripts
  /source
    /pom.xml
    /src/main/...

我签出整个主干(或某个分支),然后将源项目导入Eclipse.

I checkout the whole trunk (or some branch), and then import the source projects into Eclipse.

要管理代码更改,我在Eclipse中使用SVN同步视图,该视图比TortoiseSVN更用户友好(据我个人观点).对于/source文件夹之外的更改,我必须使用TortoiseSVN,因为这些文件不在Eclipse中.

To manage code changes, I use the SVN sync view in Eclipse, which is more user-friendly (just my opinion) than TortoiseSVN. For changes outside the /source folder I have to use TortoiseSVN, since the files aren't in Eclipse.

问题是,显然,Eclipse具有一些后台进程,每隔几分钟就会更新SVN缓存",即使您没有更改该项目的任何内容,也只是通过在工作区中打开它.并弄乱了TortoiseSVN,因此除非我执行清理工作,否则都会出错.

The problem is that apparently, Eclipse has some background process which "updates the SVN cache" every few minutes, even if you didn't change anything on that project, just by having it open in the workspace. And it messes up TortoiseSVN, hence the errors unless I perform a cleanup.

Eclipse中的团队"下有一个选项> SVN> Performance,它允许禁用SVN状态缓存...但是我上次尝试时,它并不能阻止该问题,它只会使Eclipse SVN同步速度变慢.

There is an option in Eclipse, under Team > SVN > Performance, which allows to disable the SVN status cache... but the last time I tried, it didn't prevent the issue, it only made Eclipse SVN sync slower.

我想我唯一的选择是为Eclipse和TortoiseSVN使用不同的检出文件夹(ugh ...),或者在Eclipse中禁用SVN并始终使用TortoiseSVN(ugh ...).

I guess my only choices here are to use different checkout folders for Eclipse and TortoiseSVN (ugh...), or to disable SVN in Eclipse and use always TortoiseSVN (ugh...).

这篇关于如何防止TortoiseSVN数据库锁定?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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