0

We use the Subversion version control system in our company. It's good for combination work but if two users work at same time on the same file, the system returns a conflict after commit.

I don't have any clear solution for preventing from this type of problem.

Is there any better solution than SVN for teamwork?

PS: All the users use the same user name for the SVN server.

tripleee
  • 175,061
  • 34
  • 275
  • 318
Silverboy.ir
  • 187
  • 2
  • 11

2 Answers2

4

There is no VCS that will solve your conflicts automatically, though some will merge better than others. I think the same sequence of changes on a file will result in a conflict in any VCS. The solution is to make your projects more modular, have more focused developer areas, try to break work in smaller commits and make updates more often.

CyberDude
  • 8,541
  • 5
  • 29
  • 47
  • Git is a lot better at resolving trivial conflicts, which tend to make up the majority. No tool can resolve real conflicts completely automatically, but SVN gives up much earlier than Git. – tripleee Dec 14 '12 at 07:32
  • 1
    What do you call a trivial conflict? I think it's a black or white situation - there might be grave consequences if trying to automate such a decision (on how to "fix" it) – CyberDude Dec 14 '12 at 07:43
  • Are you serious? I'm sure there are situations where you can trick Git into merging conflicting changes, but with SVN, every merge is an exercise in frustration. I'm not going back. Subversion's merge resolution is simply not very sophisticated. It requires manual intervention in many situations where it should plainly not be necessary. – tripleee Dec 14 '12 at 07:51
  • 1
    Yes, I'm serious. I'd rather spend an hour properly fixing conflicts than risking the integrity of the code and not even knowing it. Do you have an example of a conflict in SVN that's not a conflict in Git (and how is it merged)? – CyberDude Dec 14 '12 at 07:59
  • Sorry, no immediate example of my own. Just wanted to add a data point from real life to your basically good answer. Googling for "svn merge sucks" turns up some promising links, including http://stackoverflow.com/questions/2471606/how-and-or-why-is-merging-in-git-better-than-in-svn and http://stackoverflow.com/questions/2692950/whats-the-difference-between-svn-and-git-for-merging – tripleee Dec 14 '12 at 08:07
  • 1
    True, the advantages over SVN are mostly in the merging area (I've had my fair share of tedious SVN branch merges). However, I'm quite sure the OP doesn't mean this type of conflicts since they don't even use separate users. Most probably the type of conflict is about devs changing the same lines in the same file - and no VCS will solve this for anyone. – CyberDude Dec 14 '12 at 08:59
-1

GitHub

But this is an online repository

Or BitBucket BitBucket

HtonS
  • 301
  • 4
  • 18