Concurrent Version System vs Visual Source Safe
I think lot of users are confused when they shift from VSS to CVS and I thought of putting the main differences in a simple way.
Most companies in India are still using VSS where my client in Japan is using CVS. Most people complain about CVS when they first start using it because they simply compare with VSS , but will start liking it once they get used to it. I really love CVS because this gives better control and freedom for the developer.
VSS
CVS
How CVS Behaves
User 1
Local version | Server version |
---|---|
1.0 | 1.0 |
User 2
Local version | Server version |
---|---|
1.0 | 1.0 |
Say User 1 and User 2 have taken version 1.0 and start doing modifications simultaneously.
Say our sample file is sample.java
Scenario 1 : User 1 has modified sample.java from line 10 to 15
User 2 has modified sample.java from line 20 to 30
User 1 commit the changes to the server flawlessly and now the server version will change to 1.1
User 1
Local version | Server version |
---|---|
1.1 | 1.1 |
User 2
Local version | Server version |
---|---|
1.0 | 1.0 |
Now when User 2 tries to commit the changes to the server, the server will check the version of User 2 with its own. since his version is older than the current version in the server, it throws error 1 and complains that the source can't be commited.
Now User 2 has to update his local copy from the server by running the "update" command. The server will modify User 2's local copy and merge the differences flawlessly since the modifications are done in different places.
User 2 can now commit the new changes by simply running "commit" query.
Scenario 2 :
User 1 has modified sample.java from line 10 to 15
User 2 too has modified sample.java from line 10 to 15
Here also the server will merge the differences but will throw a conflict and puts >>>>> marks stating the area of conflict.
Now User 2 should remove the conflict and then only he can "commit" the changes to the server.