财产冲突 svn:ignore? [英] Conflict for property svn:ignore?
问题描述
如何解决 svn:ignore
属性的冲突?
How do I resolve a conflict for the svn:ignore
property?
我使用以下命令忽略了本地存储库中的一些文件:
I ignored some files in my local repository using the below command:
svn propedit svn:ignore .
当我运行 svn update
时,我看到了以下冲突:
When I ran svn update
, I saw the below conflict:
Conflict for property 'svn:ignore' discovered on ''
当我运行 svn diff
时,我看到以下差异:
When I run svn diff
, I see the below differences:
Property changes on: .
___________________________________________________________________
Modified: svn:ignore
-
+ cache/*
log/*
我该如何解决这个冲突?我想删除对 svn ignore
的本地修改.
How can I resolve this conflict? I want to remove my local modifications for svn ignore
.
推荐答案
文件属性就像 Subversion 中文件的内容.它们也需要修改提交并且可能会发生冲突.
File attributes are just like the contents of a file in Subversion. They too require a commit to be modified and can be in conflict.
执行svn status
,您将看到更多关于冲突的描述.三种可能:
Do an svn status
and you'll see more of a description of the conflict. There are three possibilities:
- 传入编辑和本地编辑:您和之前的版本都编辑了此属性.应该能够进行合并.
- 传入添加和本地添加:您添加了此属性,其他人也添加了.
- 传入删除和本地编辑或添加:修订版战争 - 此属性在存储库的先前修订版中,并且该人删除了此属性.你已经编辑过了.
- Incoming edit and local edit: Both you and the previous version edited this attribute. Should have been able to do a merge.
- Incoming add and local add: You added this attribute, and so did someone else.
- Incoming delete and local edit or add: A revision wars -- this attribute was in a previous revision of the repository, and that person deleted this attribute. You've edited it.
有两种方法可以解决这个问题:
There are two ways to solve this issue:
- 还原此属性.如果您添加了它,请在其上执行
svn propdel --force
.因为这是一个目录,所以不要执行svn revert .
因为您将恢复该目录中的所有更改.你不想那样做.只需恢复此属性.您也许可以通过执行svn revert --depth=empty
来恢复属性.我从来没有尝试过. - 做一个
svn 解析 .
.这会将.
中的冲突标记为已解决.不一定已解决,但您至少可以将其标记为已解决,稍后再修复.
- Do a revert on this attribute. If you added it, do a
svn propdel --force
on it. Because this is a directory, don't do asvn revert .
because you'll revert all the changes in this directory. you don't want to do that. Just revert this attribute. You maybe able to revert just the attribute by doing asvn revert --depth=empty
. I never tried that. - Do a
svn resolved .
. This will mark the conflict in.
as resolved. It's not necessarily resolved, but you can at least mark it as such and fix it later.
如果您恢复了属性更改,并以这种方式解决了冲突,请执行 svn update
并重新编辑属性.如果您对冲突执行了 svn 解决了 .
,然后通过执行 svn propget -rPREV svn:ignore .
来查看先前修订的值.通过这种方式,您可以查看以前的修订版将其设置为什么,并将其考虑在内.这可能是一个简单的订购问题.例如,之前的修订版将其设置为:
If you reverted the property change, and resolved the conflict that way, do an svn update
and reedit the property. If you did an svn resolved .
on the conflict, then take a look at the value of the previous revision by doing a svn propget -rPREV svn:ignore .
. This way, you can see what the previous revision set it to, and take that into account. It could be a simplle ordering issue. For example, the previous revision set it to:
target
build.properties
您将其设置为:
build.properties
target
最后,两者是相同的值.或者,可能是以前的修订版中有一个您没有的文件名目录.例如,它被设置为:
In the end, both are the same value. Or, it could be that the previous revision had a directory of file name in there that you didn't have. For example, it was set to:
*.log
然后您将其设置为:
build.properties
target
您可能希望将其设置为:
You probably want to set it to:
build.properties
target
*.log
首先解决冲突,进行更新,然后将其设置为您需要的值.
First resolve the conflict, do an update, and then set it to the value you need.
这篇关于财产冲突 svn:ignore?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!