CVS v. VSS mode contention confustion

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
andrew_mcfarlane
Posts: 1
Joined: Tue Feb 17, 2004 11:35 am

CVS v. VSS mode contention confustion

Post by andrew_mcfarlane » Tue Feb 17, 2004 12:02 pm

I'm a new Vault user. I have looked around the docs and on the web site, and I'm confused about one aspect of VSS v. CVS mode. From what I've seen, it seems as if this is configurable on a per-client basis. This doesn't make sense to me because I am confused as to what would happen if two users in two different modes try to deal with the same file.

For example, what happens when user A, who is in CVS mode, opens file X for editing, and user B, who is in VSS mode, tries to check out file X? Does user B get prevented from checking out? Also, what would happen if user B checked out the file first--would user A be able to then open the file for editing? If user A then tried to check it in first...etc.

Thanks for correcting my misunderstanding.
Andrew McFarlane
Welkin Consulting, Inc.

jeremy_sg
Posts: 1821
Joined: Thu Dec 18, 2003 11:39 am
Location: Sourcegear
Contact:

Post by jeremy_sg » Tue Feb 17, 2004 2:13 pm

To answer your question, both users can edit the file simultaneously, but their changes must be merged together before Vault will allow the file to be checked in.

The magic of Vault doesn't happen on checkin, but on get. For example, I work in CVS mode, so I just start editing my source file on disk, without checking it out. When I'm done editing, I look at Vault to see that someone else has checked in a new version of the file that I was working on. Vault will not let me check in the file until the changes from the repository are merged into my local file. I can then do a Get Latest on the file with Attempt Automatic Merge set, and the other guy's changes are merged into my file. If there is a conflicting change (the other guy changed one of the same lines that I did), then Vault will not let me check the filein until I manually merge the file.

If I worked in VSS mode, everything would be exactly the same, but I would check the file out before editing it. If I request an exclusive lock on checkout, then noone else would be able to change the file until I was done with it. Since automerge works so well, I personally never bother to check files out exclusively, or check them out at all.

The one thing that should be noted is that this only applies to mergeable files. Binary files can't be automerged, and Vault will only let them be checked out exclusively.

For more on automerge check out these two KB articles.

http://support.sourcegear.com/viewtopic.php?t=162

and

http://support.sourcegear.com/viewtopic.php?t=131

Post Reply