如何解决“本地编辑,更新时传入删除"信息 [英] How to resolve "local edit, incoming delete upon update" message
问题描述
当我执行 svn status .
时,我得到:
When I do a svn status .
, I get this:
! C auto-complete-config.elc
> local edit, incoming delete upon update
! + C auto-complete.elc
> local edit, incoming delete upon update
! + C popup.elc
> local edit, incoming delete upon update
! + C fuzzy.elc
> local edit, incoming delete upon update
基本上,这些文件不应该在存储库中.开发人员已将其删除.然后,我想我在事后错误地做了一个 svn rm ...
(应该已经做了 svn update .
代替).
basically, these files shouldn't be in the repository. A developer has removed them. Then, I think I did a svn rm ...
after the fact by mistake (should've done svn update .
instead).
所以现在,当我执行 svn status .
时,我会收到这些树冲突消息.
So now, when I do svn status .
, I get these tree conflict messages.
我在 here 找到了文档,但不确定如何根据文档合并"它.
I found the doc here but not sure how to "merge" it according to the doc.
如何摆脱它们?
我认为我的工作副本与存储库同步.不知道为什么会显示这些消息.这些文件应该被删除,据我所知到处都被删除.我试过 svn update .
和 svn revert .
但是当我执行 svn status .
.
I think my working copy is in sync with the repository. Don't know why these messages shows. These files should be removed and are removed as far as I know everywhere. I tried svn update .
and svn revert .
but I still get this message when I do svn status .
.
推荐答案
简短版本:
$ svn st
! + C foo
> local edit, incoming delete upon update
! + C bar
> local edit, incoming delete upon update
$ touch foo bar
$ svn revert foo bar
$ rm foo bar
如果冲突是关于目录而不是文件,则将 touch
替换为 mkdir
并将 rm
替换为 rm -r
>.
If the conflict is about directories instead of files then replace touch
with mkdir
and rm
with rm -r
.
注意:同样的过程也适用于以下情况:
Note: the same procedure also work for the following situation:
$ svn st
! C foo
> local delete, incoming delete upon update
! C bar
> local delete, incoming delete upon update
<小时>
长版:
当您编辑文件而其他人删除该文件并首先提交时,就会发生这种情况.作为一个优秀的 svn 公民,你会在提交之前进行更新.现在你们有冲突了.意识到删除文件是正确的做法,您可以从工作副本中删除该文件.而不是内容 svn 现在抱怨本地文件丢失,并且存在冲突的更新,最终希望看到文件被删除.干得好 svn.
This happens when you edit a file while someone else deleted the file and commited first. As a good svn citizen you do an update before a commit. Now you have a conflict. Realising that deleting the file is the right thing to do you delete the file from your working copy. Instead of being content svn now complains that the local files are missing and that there is a conflicting update which ultimately wants to see the files deleted. Good job svn.
如果 svn resolve
不起作用,无论出于何种原因,您可以执行以下操作:
Should svn resolve
not work, for whatever reason, you can do the following:
初始情况:本地文件丢失,更新冲突.
Initial situation: Local files are missing, update is conflicting.
$ svn st
! + C foo
> local edit, incoming delete upon update
! + C bar
> local edit, incoming delete upon update
重新创建冲突文件:
$ touch foo bar
如果冲突与目录有关,则将 touch
替换为 mkdir
.
If the conflict is about directories then replace touch
with mkdir
.
新情况:本地文件要添加到存储库(是的,svn,随便你说),更新仍然冲突.
New situation: Local files to be added to the repository (yeah right, svn, whatever you say), update still conflicting.
$ svn st
A + C foo
> local edit, incoming delete upon update
A + C bar
> local edit, incoming delete upon update
将文件恢复到 svn 喜欢的状态(即删除):
Revert the files to the state svn likes them (that means deleted):
$ svn revert foo bar
新情况:svn不知道本地文件,更新不再冲突.
New situation: Local files not known to svn, update no longer conflicting.
$ svn st
? foo
? bar
现在我们可以删除文件了:
Now we can delete the files:
$ rm foo bar
如果冲突与目录有关,则将 rm
替换为 rm -r
.
If the conflict is about directories then replace rm
with rm -r
.
svn 不再抱怨:
$ svn st
完成.
这篇关于如何解决“本地编辑,更新时传入删除"信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!