Visual Studio, SourceSafe and the Unified Root...

There is something I don't understand about the way VSS works.

I create a solution in my VSS Directory C:\VSS\Test called "Soln". So the .SLN file is in the directory C:\VSS\Test\Soln. I also created a project at the same time called App1. Its files are in the directory C:\VSS\Test\Soln\App1.

Not that it matters for what follows, I then added a new project to this same solution called App2 and its files are in C:\VSS\Test\Soln\App2.

I use VSTE2005 to add this solution to source control (VSS 2005). I already have a project off the root of VSS called Test. I then use $/Test as the Location and leave the name at the default (i.e. Soln.root).

This then creates the path $/Test/Soln.root/Soln... et cetera

I understand this is the "Unified Root" and I know that this behaviour can be turned off. To say that this is slightly irritating is something of an understatement because the mapped root of C:\VSS is $/ which means that this throws the mappings out at lower project hierarchy levels for the VSS client.

The documentation makes some vague reference to performance implications of disabling the Unified Root. In particular it refers to multi-projects. However, as there is already a solution\project structure and the Unified Root is empty it's hard to understand what difference this could make.

Can anyone more clearly explain what the implications are before I tear out what little remains of my hair on VSS?

[1551 byte] By [MarkWHarrison] at [2007-12-24]
# 1

Hi Mark,

The unified root Soln.root is a good thing. It helps grouping all the projects in the solution, such that later it will be easier to branch the solution. It also helps minimizing the number of connections opened to the database, improving performance. And it helps reducing the number of prompts when adding new projects to source control.

Here is how it works:

- when adding the solution to scc, you select an existing folder in the scc database (in your case $/Test)

- you also can select a new subfolder name. The default is Soln.root, but you can change it or leave empty. If this name is not empty, a subfolder will be created and be used as the unified root. In your case you left the default so $/Test/Soln.root was created.

- under the unified root there will be created folders for the connections opened to the database. In your case, you add Soln, App1 and App2 in the same time, so the local connection root is calculated as C:\Vss\Test\Soln (the closest folder that contains all the files in all these projects added to scc), and this folder is bound to the source control database to $/Test/Soln.root/Soln

- say now you add to the solution a project C:\VSS\Test\OtherProject and want to add it to scc. The local connection root for this project is calculated as C:\VSS\Test\OtherProject because it cannot be shared with the already bound folder C:\Vss\Test\Soln (the files in this OtherProject folder are not under C:\Vss\Test\Soln). Because unified root is enabled, VS creates a new subfolder in the scc database, $/Test/Soln.root/OtherProject, to be used by the new connection to the database from C:\VSS\Test\OtherProject to $/Test/Soln.root/OtherProject. If unified root was disabled, when you checkin your solution VS would have prompted here to manually select a database location for this project (Even more, if you add 2 or 3 projects to scc at the same time you get 2-3 prompts, and since the AddtoScc tooltip was cut, you wil just get 2-3 SelectDatabaseFolder dialogs but you'll have no idea why and where will the locations be used for - this is confusing.)

- similar new connections will be created if you: add a project from a different drive, or add a http:// web project, etc.

If you need to branch the solution at some point in time you can just select the $/Test/Soln.root and branch it.

The .root folder is just a default name. You could have cleared the Soln.root edit box during add to scc, and in that case the $/Test would have been used as unified root. The structure in the scc database would have resembled more with the structure on disk. To branch this solution you would need to selecte $/Test and branch it, which might not be the desired result if the C:\VSS\Test contains other solutions that you don't intend to branch.

Alin

AlinConstantin-MSFT at 2007-8-31 > top of Msdn Tech,Visual Studio,Visual Studio Source Control and SourceSafe...

Visual Studio

Site Classified