In HgInit Joel basically states that Mercurial will make merges much much easier than Subversion.
Here's a typical scenario which leads to tons of conflicts in Subversion and makes concurrent work with the source code problematic. We have a function with many (say, 4) parameters that is called from numerous sites in the code. Now
user A sees this mess and notices that actually those 4 parameters always come from the same class (say
CSettings). Something like:
doStuff( settings->GetAddress(), settings->GetColor(), settings->GetIdiocy(), settings->GetWhatever() );
So he decides to refactor the code - pass one parameter and make the function retrieve the data from the class. So it becomes just:
doStuff( settings );
user B is completely unaware of that refactoring and he decides that he absolutely needs to add a 5th parameter to that function which (SUDDENLY) also comes from the very same class
doStuff( settings->GetAddress(), settings->GetColor(), settings->GetIdiocy(), settings->GetWhatever(), settings->GetEvenMore() );
The point is both users change the very same lines of code in two completely different ways. Now the faster gun of them
svn commits, the other one needs to
svn update and resolve a ton of conflicts which requires a lot of manual labor.
How will Mercurial be better in this situation?