Concurrent Development in the IDE

A collection of information about Vault, including solutions to common problems.

Moderator: SourceGear

Post Reply
dan
Posts: 2448
Joined: Wed Dec 17, 2003 5:03 pm
Location: SourceGear
Contact:

Concurrent Development in the IDE

Post by dan » Tue Apr 13, 2004 2:07 pm

The IDE can be set up to allow multiple developers to work on the same file at the same time. To work in this mode, files must be checked out non-exclusively, and they must be files types that are considered “mergeable” by Vault.

Checking out files non-exclusively can be accomplished as follows:

-- Set the Vault global default option to not require exclusive locks. This will automatically check files out non-exclusively. From within Visual Studio.Net, go to Tools->Options->Source Control->SCC Provider->Advanced button. This will bring up Vault’s options. In the General Pane, uncheck “Always request exclusive locks”.

-- If you have Visual Studio configured to display a dialog on checkout (Tools->Options->Source Control->General->Display silent check out command in menus is unchecked), you can decide on each checkout whether to request an exclusive lock. Invoke Check Out on a file or group of files, and when the dialog is displayed, click the advanced options (in VS.Net, this is the upper left hand icon in the dialog). This will allow you to set the “Request exclusive lock” setting for that group of files.

"It won’t let me request an exclusive lock"
If you requested that a file be checked out non-exclusively, but it didn’t work, the problem could be:
--The file is already checked out exclusively by someone else.
--The file is not a mergeable file, which is checked out exclusively regardless of settings.

For non-mergeable files, the option to request an exclusive lock will be disabled in the advanced options.

What are mergeable files?
From Vault’s point of view, a mergeable file is a simply file with an extension that matches the list of mergeable file types in the Vault Admin Tool, (RepositoryName) >Repository Options>File Types pane. More generally, it is a file that is text and line based, that allows a merge tool to take two sets of changes from different users, and merge them together into a single version.

Binary files cannot be merged by a general text-based merge tool, and therefore must be checked in and out serially, rather than concurrently. A binary file can only be merged properly by using a merge tool specifically designed to handle that file type, which is not supported by Vault. Vault, like most source control systems, uses a generalized text-based merge algorithm.

Not all known text-based files are in the mergeable list by default. For example, machine generated files, such as project files and xml files, are not by default deemed mergeable, since sometimes very small changes to the content will result in massive changes to the file (depending on how the program that generates the file handles changes to content). If a small change generates lots of changes to the file, the odds of being able to merge two versions together is greatly reduced, and it is safer to require exclusive checkouts on such files. If you are confident that the project or xml files in your development environment that are machine generated can be merged, then add those file types to the mergeable file extension list in the Vault Admin Tool.

Can I use “CVS-Mode” in the IDE?
Vault “CVS-Mode” is a way to allow concurrent development in Vault. In this mode, files can be edited without checking them out, all files are read-write on the local disk (so you can start editing them without checking them out), and Vault scans for files that have changed since the last Get operation, and automatically adds them to your pending change set.

CVS Mode is supported in the Vault Client and in Visual Studio Enhanced Client integration.

However, the Vault Visual Studio Classic client does not handle this mode, because it requires that files be checked out before they can be checked in, and also sometimes determines that a file is checked out merely because the file is read-write. If Visual Studio thinks a file is checked out when it isn’t in Vault, or vice-versa, the integration between Vault and Visual Studio breaks down, and you will get confusing behavior and errors.

It is important that when you start using the IDE, you do a fresh Get Latest (or an Open from Source Control) to a fresh working folder FROM WITHIN THE IDE, to ensure that the files retrieved are read-only (f you're using VSS Mode) or writable (if you are using CVS mode), and appropriate for the specific development workflow.

Post Reply