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 .
When I ran svn update
, I saw the below conflict:
Conflict for property 'svn:ignore' discovered on ''
When I run svn diff
, I see the below differences:
Property changes on: .
___________________________________________________________________
Modified: svn:ignore
-
+ cache/*
log/*
How can I resolve this conflict? I want to remove my local modifications for svn ignore
.
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.
Do an svn status
and you'll see more of a description of the conflict. There are three possibilities:
There are two ways to solve this issue:
svn propdel --force
on it. Because this is a directory, don't do a svn 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 a svn revert --depth=empty
. I never tried that.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.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
You set it to:
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
and you set it to:
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
is a property of the parent folder that contains the files you have set to be ignored. It is that folder, therefore, that is exhibiting a conflict.
Plan A The easiest solution is to delete that containing folder then do an SVN update to restore it as it exists in the repository.
Plan B
If deleting the folder is not an option for you for some reason (e.g. if you have some modified files you want to keep) then rename the folder (e.g. to yourfolder-TEMP
) and again do an SVN update. This recreates yourfolder
with no conflict in the svn properties. Now copy back the files you need from yourfolder-TEMP
to yourfolder
and then delete the old folder once you are satisfied you have preserved what you need.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With