Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SVN messes with my files with jibberish data, why?

Sometimes, I find myself in a situation where valid files are made invalid by doubling the contents, placing ======= in the middle, <<<<<<< .mine at the beginning and <<<<<<< .r1276 at the end. This results in unbuildable projects:

<<<<<<< .mine
using System;
using System.Data;

namespace MyNamespace
{
     class Xyz
     //... a lot more code ...
}=======
using System;
using System.Data;

namespace MyNamespace
{
     class Xyz
     //... a lot more code ...
}
>>>>>>> .r1276

It seems to want to say "the first part is mine the second part belongs revision 1276", but why does it do this and more importantly, how do I prevent it? I use AnkhSVN and Visual SVN / Tortoise from Visual Studio. I probably clicked the wrong buttons, but wdon't know which I did and would gladly hear from someone more knowledgeable with SVN how I managed to get my files to messed up and what to do to prevent it next time around.

like image 251
Abel Avatar asked Dec 16 '22 22:12

Abel


1 Answers

You have merging conflicts that need to be resolved. TortoiseSVN will show these files in a conflicted state, with the "Gibberish" being the way that SVN tracks the attempted merge information.

Do not alter the files manually. Use TortoiseSVN "Resolve conflicts" and the UI it provides to resolve these conflicts.

These conflicts arise after two developers have edited them and are trying to check-in their changes and the two files cannot be automatically merged.

like image 144
Dave White Avatar answered Dec 28 '22 04:12

Dave White