SVN keeps corrupting files with "<<<<<<< .mine", how to fix?
Solution 1
That happens when svn encounters a conflict: You changed a file, the file on the server was changed and it cannot (easily) be merged automatically. You need to decide what is the correct solution now.
Subversion just adds the diff into your source file (and creates files next to it, called OriginalName.mine (unchanged) and OriginalName.rsomething (unchanged, server version)).
Fix the conflict and tell subversion that this is resolved.
Solution 2
just delete the obj folder and it will worked fine.
Solution 3
Remove the code that shouldn't be in the file throwing the error and remove the the three files with extensions .mine, .<somerevision>
and .<some_other_revision>
. svn updated files that now contain 'conflicts' and you need to resolve these conflicts by hand. Usually this means you edited a file, someone else edited the same file and checked in changes and you didn't pay attention when checking out the changed file.
Solution 4
Delete every thing you have in obj folder .
Remove your obj folder from svn
version control . Because on every build it get updated and when other developer commit changes to solution SVN is unable to marge obj folder files and raise error
Files has invalid value "<<<<<<< .mine". Illegal characters in path.
Solution 5
Please read the Basic Usage chapter in the subversion book. It has a section about Merging conflicts by hand which explains the conflict markers you're seeing.
Comments
-
MysticEarth almost 3 years
I've got a Visual Studio C# project which is under version control (SVN). I've always commited and updated the project without any problems. But a couple of hours ago Visual Studio throws the following error when I try to launch/rebuild the project:
Files has invalid value "<<<<<<< .mine". Illegal characters in path.
I don't know how to fix this problem. What should I do?
-
MysticEarth over 14 yearsPerhaps a stupid question; but where can I find the .mine files? I can't seem to find them. Also, no file is in conflict and when I search through all files for "mine", nothing is found...
-
Benjamin Podszun over 14 yearsRight next to the source file that doesn't compile anymore (because of the conflict markers). Check for files with the same basename, but different extensions.
-
MysticEarth over 14 yearsWell, Visual Studio doesn't give any filename, just the error above. And I don't see any conflict markers...
-
Pike65 over 14 yearsIt will either be in the .csproj (or .vcproj or whatever) file or the .sln file. You can use the appropriately titled 'blame' function of svn to see who committed the offending lines. Whoever that is has resolved a conflict incorrectly.
-
Benjamin Podszun over 14 yearsForget Visual Studio for a moment and navigate to the file in the filesystem. You'll find the mentioned files there. You can resolve the conflict from your IDE though (edit the file). Evil train of thoughts: Maybe some of your co-workers managed to check that file in with conflict markers inside..?
-
Oliver over 14 yearscurrently i was writing an example of my own, but like always the svnbook has a far more comprehensive one and if you're using Tortoise take a look into tortoisesvn.net/docs/release/TortoiseSVN_en/index.html (especially into chapter 4 Daily Usage Guide)
-
MysticEarth over 14 yearsThanks all. Found the problem by viewing differences with my working copy, it seemed to be a file in the Debug folder (which I exluded from SVN today). One of my co-workers resolved things while not being resolved..
-
MysticEarth over 14 yearsThanks all. Found the problem by viewing differences with my working copy, it seemed to be a file in the Debug folder (which I exluded from SVN today). One of my co-workers resolved things while not being resolved..
-
djeidot over 12 yearsVisualSVN actually does this using TortoiseSVN. You can also do it with TortoiseSVN by right-clicking the file in Windows Explorer and selecting Edit Conflict.
-
Withheld over 11 yearsFix the conflict in which of the 3 files?
.mine
?.rOLDREV
?.rNEWREV
? Answer: None of them. Instead, fix in the original file (that's right: SVN's attempt to commit leaves 4 confusing files) -
MysticEarth over 10 yearsThe obj folder has nothing to do with corrupting files by Subversion
-
Brandon Arnold over 10 years@MysticEarth: The error that you have in the subject line comes up sometimes if you try to build before resolving the conflicts, and keeps coming up EVEN AFTER you have resolved it. grepping the directories doesn't turn up anything to do with "<<<<<.mine" because it's embedded in binary form beneath obj; thusly you're none the wiser what is causing the build problem, nor how to fix it. Deleting /obj fixes the problem immediately. So you're wrong, the obj folder has something to do with corrupting files by Subversion. Ho hum.
-
Mathieu Guindon over 10 years+1 this worked for me as well. The "Error List" wasn't listing any specific file and I had manually resolved the conflicts and ReSharper wouldn't see any problems in the solution, and Find wouldn't find anything like ".mine", but still VS would refuse to Build or even to Clean. Deleting the "obj" folder was an instant fix. No need to restart VS.
-
Mathieu Guindon over 10 yearsNo need to close/reopen VS. Click "Show all files" in the Solution Explorer and delete the "Obj" folder. Done.
-
Wael Dalloul about 10 yearsThanks, it was because of the debug folder, it was not pointing to an actual file.
-
MansoorShaikh about 7 yearsThis is what I do all the time to get past this error.
-
Anjan Kant almost 6 yearsyes it worked fine for me also. I just deleted "obj" folder and it worked fine for me.
-
Rapunzo almost 6 yearsThanks for solution!