What is the proper workflow/branching technique?

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

Moderator: SourceGear

Post Reply
SlyW
Posts: 16
Joined: Fri Feb 17, 2006 4:57 pm

What is the proper workflow/branching technique?

Post by SlyW » Tue Dec 18, 2012 2:43 pm

Current Version of Vault: 6.0.1.598

We migrated from VSS to Vault about four years ago and have been quite pleased. As we mature our internal processes, we are trying to improve the way we "version" our products.

Background
Our core product is an ASP.NET webforms application with a series of supporting libraries. Currently, we are using both the Vault GUI and the enhanced client in VS.NET 2010 (will be upgrading to 2012 in the near future).

Regarding the ASP.NET piece, it is comprised of a dozen or so Web Applications (i.e. their own .sln file, their own virtual directory, etc.). For the sake of argument, we will refer to the top level virtual directory as http://server/ourApp_v1/ and each application is subordinate to it: http://server/ourApp_v1/subApp_1/ and http://server/ourApp_v1/subApp_2/ etc.

There are about 20 libraries and each is a simple DLL with its own .sln file.

As for our current Vault structure, we have individual repositories per version -- we are on version 8 and thus have 8 repositories containing everything (web apps, libraries, sql scripts, etc.). Working folders are based on the version: c:\ourApp_v1\ and c:\ourApp_v2\ etc.

Current Workflow
When we prepare a new version, we clone the entire repository into a new repository and make changes as needed.

However, if we discover we need to make a fix to an older version, we end up making the change in the repository without a clean way to segregate that individual change from the "release" structure of that same version. Moreover, trying to "get" the original release version or individual patches is onerous. We have used labels in the past, but find their lack of "obviousness" discouraging (i.e. you have to look into the history of a file to discover the label).

What are we asking?
Having read chapter 11 of Mr. Sink's book (thank you for making it available online; I have directed most of our team to it for reference) over and over, we are convinced that we can achieve zen via share/branch/merge. The libraries and sql should prove quite straightforward. However, we are failing to deduce the best approach for the web applications.

Originally, we considered a structure in Vault ala:

Code: Select all

$ourApp/
         |
         |--trunk/ (working folder c:\ourApp\trunk\; virtual directory: http://server/ourApp_trunk/)
         |    |
         |    |-- libraries/ 
         |    |          |
         |    |          |-- dataHandler/ 
         |    |         [:]
         |    |
         |    |-- webapps/ 
         |    |          |
         |    |          |--portal/ 
         |   [:]        [:]
         |
         |--v8/ (branch from trunk; working folder c:\ourApp\v8\; virtual directory: http://server/ourApp_v8/)
         |    |
         |    |-- libraries/
         |    |          |
         |    |          |-- dataHandler/ 
         |    |         [:]
         |    |
         |    |-- webapps/ 
         |    |          |
         |    |          |--portal/ 
         |   [:]        [:]
         |
         |--v9/ (branch from trunk; working folder c:\ourApp\v9\; virtual directory: http://server/ourApp_v9/)
         |    |
         |    |-- libraries/ 
         |    |          |
         |    |          |-- dataHandler/ 
         |    |         [:]
         |    |
         |    |-- webapps/ 
         |    |          |
         |    |          |--portal/ 
         |   [:]        [:]
        [:]
This is fine for whole releases as we are already modifying the .sln files for the updated URLs. However, things fall apart when we want to create "point" releases for enhancements and/or bug fixes. How do we create a branch for an individual web application without having to reassign the entire application's virtual directory structure? If we need only fix one webapp for the point release, do we create a branch beneath the individual webapp?

The greatest hurdle appears to be the inability to map the two projects to the same working folder. Every time we think we have a solution, we end up with two projects pointing to the same working folder (the version's initial-release branch and the version's point-release branch).

Please, any insight/suggestions are welcome. As you can imagine, we have spent many hours thinking about this and only finally found the humility to ask the organization truly adept at the practice.

Regards,
Eric

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: What is the proper workflow/branching technique?

Post by Beth » Wed Dec 19, 2012 10:01 am

Eric's book has a particular focus on distributed source code control, not centralized source code control. You should still take a look at Eric Sink’s old Source Control How To. That will give you some better answers to their current issue.

Here is a list of good resources.
Eric Sink's Source Control How To: http://www.ericsink.com/scm/source_control.html
Best Practices for setting up repositories: http://support.sourcegear.com/viewtopic.php?p=5183
Best Practices for Managing Branches: http://support.sourcegear.com/viewtopic.php?t=193
Basics of using Label, Cloak, Share, Pin, Branch and Merging: http://support.sourcegear.com/viewtopic.php?t=9
How to label as part of a build script: http://support.sourcegear.com/viewtopic.php?t=15

Your new branches of each release look fine. You don't need to create branches for bug fixes or point releases. Instead check out using labels for those. Place a label when you release. Then work in the same branched code and check in changes for the bug fix. Then place another label and release from that label.
Beth Kieler
SourceGear Technical Support

SlyW
Posts: 16
Joined: Fri Feb 17, 2006 4:57 pm

Re: What is the proper workflow/branching technique?

Post by SlyW » Wed Dec 19, 2012 11:34 am

Thank you, Beth.

I see, now, how the interplay between Branches and Labels can help us realize what we are trying to accomplish.

We will make some effort in this approach and, hopefully, report back our success.

All the best!

Beth
Posts: 8550
Joined: Wed Jun 21, 2006 8:24 pm
Location: SourceGear
Contact:

Re: What is the proper workflow/branching technique?

Post by Beth » Wed Dec 19, 2012 3:02 pm

Feel free to let us know if you have any further questions.
Beth Kieler
SourceGear Technical Support

Post Reply