Code: Select all
Libraries
Lib1
Lib2
...
Web Applications
App1
App2
...
How do other developers handle this problem of versioing the shared libraries along with their applications?
Moderator: SourceGear
Code: Select all
Libraries
Lib1
Lib2
...
Web Applications
App1
App2
...
If I use a common root folder, won't a label apply to everything in the root? I.e., to expand on your example:lbauer wrote:For this to work properly, you really need a common directory for both Libraries and Web Apps:
Code: Select all
$/My Apps
/Libraries
/My Apps.
/App1
/App2
/App3
/App4
I'm not sure I understand this option. Using the above repository structure, if I need to pull a branch on App1, where would the library folders go? Is the idea to physically relocate them in the branch underneath my app folder? Wouldn't that break the working folder in Vault?Another option might be branch Libraries at the version you want, and put that under the folder as Web apps.
This is kind of where I was going. Again, how do other people (including SourceGear) handle this idea of having multiple projects sharing multiple libraries?You could also share Libraries, though any change to one of the shared directories would be reflected in the other shares.
Right now, the projects reference the library projects directly anyway. So, it is already the case that changes to the central libraries are seen by the various application projects. Generally, that's a good thing. The problem is in making a branch off a specific label. If the referenced projects are not physically underneath the parent web project in the repository, there doesn't seem to be a clean way of creating a branch which includes everything that was labeled (i.e., includes the referenced libraries).lbauer wrote:If the web app versions need different versions of the libraries, then sharing may not work, because all the shared links will be updated when files in one of the shares is updated.
You might be better off with branching. Branch Libraries at the version you want. You can even branch from history. The branch can go into the Web App folder or parent folder.
The problem here comes in having multiple web applications that reference multiple library projects folders in which the library project directories are not directly underneath each application's folder in the repository. It seems that the only way to pull a full solution based on a label is if there is a common parent folder to all of the assembly project folders in the solution and that leads back to using Shared Folders. It is either that, or manually branch folder by folder on the same label.Regarding labels, yes you could label the parent folder and all the subfolders would be labeled as well.
But you could get just the subfolder that was labeled. You can use the Show Labels command on a subfolder and see the inherited label, and get just the labeled versions from the subfolder level.