我对svn move和svn ci做了一些非常愚蠢的事。
旧目录结构:
source/branch1/test_framework/
source/branch2/test_framework/所需的目录结构:
source/branch1/
source/branch2/
source/test_framework/ <-- This is a merge of the 2预期步骤:
我是怎么开始的
[dev@bld Prod1]$ svn move source/branch1/test_framework/ source/test_framework/
A source/test_framework
D source/branch1/test_framework/main.sh
D source/branch1/test_framework我应该做的是:
[dev@bld Prod1]$ svn ci source/test_framework/ source/branch1/test_framework/ -m "Move test framework to top level."我的愚蠢
[dev@bld Prod1]$ svn ci source/test_framework/ -m "Move test framework to top level."
Authentication realm: <http://localhost:8443> UNIX/LDAP User Account
Password for 'dev':
Adding source/test_framework
Committed revision 274232.
[dev@bld Prod1]$ svn ci source/branch1/test_framework/ -m "Move test framework to top level."
Authentication realm: <http://localhost:8443> UNIX/LDAP User Account
Password for 'dev':
Deleting source/branch1/test_framework
svn: Commit failed (details follow):
svn: Item '/repo/CoreApps/Prod1/source/branch1/test_framework' is out of date在这里,我查找了Google和StackOverflow,并对Item ... out of date错误进行了以下修复:
[dev@bld Prod1]$ svn update
Authentication realm: <http://localhost:8443> UNIX/LDAP User Account
Password for 'dev':
C source/branch1/test_framework
At revision 274233.
Summary of conflicts:
Tree conflicts: 1现在我被困住了:
[dev@bld Prod1]$ svn ci source/branch1/test_framework/ -m "Move test framework to top level."
Authentication realm: <http://localhost:8443> UNIX/LDAP User Account
Password for 'dev':
svn: Commit failed (details follow):
svn: Aborting commit: '/repo/CoreApps/Prod1/source/branch1/test_framework' remains in tree-conflict现在我该怎么解决这场冲突?请注意,svn merge不是一个问题,而是我如何到达这里的一个解释点。
我希望能给出答案,给出该怎么做的理由。
编辑--我用来解决问题的解决方案(这并不理想)。(接受的答案更好):
svn status source/branch1/test_framework/列出在svn move期间删除的文件svn revert source/branch1/test_framework/$FILE对上面列出的每个文件撤消svn move的删除/删除操作。svn delete source/test_framework/以撤消svn move的复制操作,然后是svn ci source/test_framework/以签入删除。发布于 2013-07-11 07:37:53
这是Subversion中的一种撤消/重做功能,这是一种常见的方法,用于清理由错误提交引起的存储库的混乱状态,而在最上面完成的提交并不多,而混乱的提交中没有太多的智能工作(这正是您的情况,提交是一个简单的svn mv)。因此,基本上,我建议在不试图理解混乱状态(并节省时间)的情况下盲目地回滚更改,然后正确地重复svn mv。
https://stackoverflow.com/questions/17587204
复制相似问题