This project has moved. For the latest updates, please go here.

Disk structure guideline?

May 20, 2010 at 4:56 PM

Is there any guideline as to how the directory structure should be created on the hard drive?  I did a quick test of a branch, and if I remember it asked me for a new disk folder for the branch. Since I'm just testing right now, I have c:\SourceTest and c:\SourceTestBranch. 

Would it be more logical to plan ahead, and create c:\Source with two subdirectories, Main and Dev for example?  Or is the philosophy that each developer should decide for himself where on his own disk he want to store both the Main and the Dev-Branch?   By having it hierarchical like this, could a person do a "Get latest" of both the Main and Dev-Branch at the same time?

What about the relationship to workspaces?  Should I try to have just one workspace for all my branches and all my projects? 

Thanks,

Neal Walters

 

Developer
Jun 8, 2010 at 4:50 PM

Neal,

I am not sure how elaborate directory structure guidlines can be, since much depends on the structure of the underlying code, solutions, etc.

First, let me emphasise that there is still an underlying 255 character limitation on path length imposed by the operating system. You may discover, that long file names, long branch names, and long folder names combine, after a while, to create unwieldy path names.

I generally create a *root* folder for all my Team Projects on my local hard drive (for example, c:\VS2010 or c:\Projects or something similar). This will become the container folder for all of the team projects that I need to map workspaces for.

Under this *root* folder, I generally have a folder for each Team Project (for example if I have TeamProjectABC and TeamProjectXYZ, I will have corrsponding folders c:\VS2010\TeamProjectABC and c:\VS2010\TeamProjectXYX.

When I create a local workspace mapping for a team project I often just map the Team Project to this local folder corresponding to the TeamProject. (In fact, when I create the mapping, I can create the workspace mapping at the same time).

After the mapping has been established, as I add a folder in Source Control Explorer (after doing a checkin), or create a branch it will create the corresponding folders on my local drive.

Each TeamProject, presumably would have its own separate set of branches, although there are some situations where you might branch across projects.

I think it makes sense to propose a company-wide guideline for setting up the directory structure on a developers local hard drive. I think this is better than leaving this up to individual developers to decide on their own.

When you have a structure like this, you can do a get latest on the Team Project, and it will do a get latest of all the underlying branches. The structure on disk is does not dictate the branch hierarchy. This is why, in Source Control Explorer, you could put all the branches into a single folder on the local drive.

When you do a branch hierachy view, you will see the branch hierachy, while in Source Control Explorer, you will see the folder/branch structure.

Regards,
Bill Heys
VS ALM Ranger