有时我会尝试提交文件并收到错误:
Transmitting file data .svn: E200030: Commit failed (details follow):
svn: E200030: database disk image is malformed
This answer建议运行以下命令:
$ sqlite3 .svn/wc.db "pragma integrity_check"
我这样做并简单地得到以下结果:
ok
相同的答案建议将新副本 check out 到不同的目录中,而不是将 .svn
目录复制回当前目录。我也尝试了这个,但得到了同样的错误:
$ svn co $URL /tmp/svn-tmp
$ rm -rf .svn
$ cp -r /tmp/svn-tmp/.svn .
$ svn ci -F svn-commit.txt
Transmitting file data .svn: E200030: Commit failed (details follow):
svn: E200030: database disk image is malformed
我通常可以将问题追溯到我尝试提交的单个文件,并且通常是该文件中需要删除或替换的单个字符;通常它是空白。即使仅在 OS X 和 Linux(而不是 Windows)上编辑文件,也会发生这种情况。该问题发生在不同的系统和不同版本的 SVN(1.7 和 1.8)上。
最近我注意到,如果我尝试在两个不同的系统(一个 OS X,一个 Linux)和两个系统上对同一个文件(a package.json)进行相同的更改(将数字 3 替换为数字 4)不同版本的SVN(分别为1.8和1.7),这两种情况都会出现该问题。
我还能做些什么来尝试诊断这些问题吗?
最佳答案
之前已经问过这个问题:
svn cleanup: sqlite: database disk image is malformed
答案是:
You do an integrity check on the sqlite database that keeps track of the repository (/.svn/wc.db):
sqlite3 .svn/wc.db "pragma integrity_check"
That should report some errors.
Then you might be able to clean them up by doing:
sqlite3 .svn/wc.db "reindex nodes" sqlite3 .svn/wc.db "reindex pristine"
If there are still errors after that, you still got the option to check out a fresh copy of the repository to a temporary folder and copy the .svn folder from the fresh copy to the old one. Then the old copy should work again and you can delete the temporary folder.
关于svn: E200030: 数据库磁盘镜像格式错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/38422025/