SVN X 仍然处于树冲突中
我正在使用 VisualSVN(它使用 Tortoise)。我不小心将文件夹移动到其他位置。当尝试将其移回时,SVN 会出现此错误。它以前发生过一次,我设法做了一些随机更新/提交,不知道我在做什么,它被“修复”了。我无法再次发挥同样的魔力,所以我需要知道如何获取我的文件和目录以及树冲突。
谢谢!
I am using VisualSVN (which uses Tortoise). I accidentally move a folder to a different location. When tries to move it back, SVN pukes with this error. It happened once before and I managed to do some random updates/commits, not knowing what I was doing and it was "fixed". I cannot pull the same magic again, so I need to know how to get my files and directory and of tree-conflict.
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
发布评论
评论(6)
我有同样的错误(树冲突),但来自不同的工作流程。
查找哪个进程拥有锁。下载 Handle.exe,然后打开您解压到的文件夹。然后运行“C:\path\handle.exe”“C:\path\FileOrFolder”
。
https://technet.microsoft.com/en-us/sysinternals/bb896655.aspx重现
工作流程:
- delete folder (having one of the files locked by a program that is within this folder)
- commit parent folder of folder you deleted, and look for red text of the folder you deleted (it should be brown, not red if there aren't issues in SVN)
修复:
- forcefully kill the lock (or close the program so it releases the lock)
- run cleanup command on folder you deleted
- revert folder you deleted
- delete folder you deleted
- commit parent folder of folder you deleted
http://rubyjunction.us/subversion-hell-sh
编辑
这是链接中的 shell 脚本,对 Linux/Unix 用户可能有用......
#!/bin/sh
if [ "" == "$1" ] ; then
echo "Usage: subversion-hell.sh A_PROJECT"
echo "A_PROJECT should be a Subversion folder you are having problems with,"
echo "and you should be in the folder above A_PROJECT"
fi
DIR=`pwd`
PWD=$DIR
DIR=`echo $DIR | sed s/^.*\\\/trunk/trunk/`
mkdir ~/tmp/ 2>/dev/null
rm -Rf ~/tmp/$1 2>/dev/null
mv ~/$DIR/$1 ~/tmp/
find ~/tmp/$1/ -iname '.svn*' -exec rm -Rf {} \; 2>/dev/null
cd $PWD
echo svn co YOUR_URL_HERE/$DIR/$1 $1
svn co YOUR_URL_HERE/$DIR/$1 $1
cp -Rf ~/tmp/$1/* $PWD/$1/
# YOUR_URL_HERE can be found by looking in file .svn/entries, near the top
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我不确定它现在处于什么状态,但最好的选择可能是:
svn cleanup
svn update
I'm not sure what state it's in now, but your best bet would probably be to:
svn cleanup
svn update