Hi All,
We are evaluating SourceGear and need some help understanding the "best" way (provided there is such a thing) to address customer-specific versions.
We are doing web development for .net.
We have a base of code that is usually very similar, but there are tons of pieces of code that are different.
e.g. for a site, much (but not all) of the /app_code directory and /bin directory will be the same from customer to customer.
However, almost in NO case is the /images or our /templates (master pages) folder going to be the same from one customer to the next.
In addition, we develop and maintain a "sample" site with the latest features in it.
Currently, we end up doing everything long-hand (copy the latest code into a new working directory, remove/replace the files as needed, update bug fixes in each version by hand)... this is tedious and challenging, and will reach a point of impossibility when our customer base gets much larger.
We had considered making a trunk out of the sample site as it is usually the code under development.
However, if we do that, then we would be in a bit of an issue when we start trying to develop a customer version.
If the development always happened at the trunk, we'd only be able to devlope on our sample site after we completed development on the customer site.
Seems we'd have to somehow always be switching out the trunk between "our" version (the sample) and the customer's version.
So the question is: What is the "best practice" way to handle customer-specific versions of a web site.
I think the web part is an important distinction because it implies that there will always be a significant portion of the app that will truly never "branch" from the original, yet, some of the app will always be a branch.
Thanks for the info.
Branch for Customer-Specific Version
Moderator: SourceGear
Re: Branch for Customer-Specific Version
It sounds to me like you could use a combination of branching and sharing. You would have a trunk of the base code and create a folder for each customer. In that folder, you would share the items that don't change for each customer. When you make a change to one of those copies, all would get it.
Next, if you are never merging the individual customer changes back to the trunk, or the trunk out to the branch, then a branch might not be the best way to go. Are there files that everyone has, but might have a line change or two? Or are the files not related at all. If there's no relation, then in each customer folder, you could just add the unique items. If you are merging, then the items or folders that will go through a merge could be branched out to each customer.
Here are a few resources for additional information:
Eric Sink's Source Control How To
Best Practices for Managing Branches
Basics of using Label, Cloak, Share, Pin, Branch and Merging
Next, if you are never merging the individual customer changes back to the trunk, or the trunk out to the branch, then a branch might not be the best way to go. Are there files that everyone has, but might have a line change or two? Or are the files not related at all. If there's no relation, then in each customer folder, you could just add the unique items. If you are merging, then the items or folders that will go through a merge could be branched out to each customer.
Here are a few resources for additional information:
Eric Sink's Source Control How To
Best Practices for Managing Branches
Basics of using Label, Cloak, Share, Pin, Branch and Merging
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support
Re: Branch for Customer-Specific Version
Hi Beth,
Thanks for the ideas... I think you are on the right track... perhaps sharing is the way to go.
The only caveat I can think of is that sometimes we'll add functions, but they are basically a "for pay" upgrade.
So lets say that function is contained in a class file, .aspx file, and the code behind file.
If the customer doesn't want to pay for the feature, we'd just leave it as is... otherwise, we'll integrate the base changes to their site.
In the sharing example, wouldn't we be always pushing out the changes because of the "shared" aspect?
We have the situation where both situations you mention occur.
On some jobs, there will be a line or two of code that is different with the majority being the same... perhaps we could code better to avoid this...
And on those same jobs, we'll always have files that are unique to just the one customer.
Is there any option (even for pay) to get assistance setting this up properly from the Sourcegear staff?
As I mentioned, we have been doing this by hand before, and I do not want to start off on the wrong foot.
Nothing would be worse than finding out in 6 months that we did something to cause ourselves a bunch of extra work.
Thanks for the ideas... I think you are on the right track... perhaps sharing is the way to go.
The only caveat I can think of is that sometimes we'll add functions, but they are basically a "for pay" upgrade.
So lets say that function is contained in a class file, .aspx file, and the code behind file.
If the customer doesn't want to pay for the feature, we'd just leave it as is... otherwise, we'll integrate the base changes to their site.
In the sharing example, wouldn't we be always pushing out the changes because of the "shared" aspect?
We have the situation where both situations you mention occur.
On some jobs, there will be a line or two of code that is different with the majority being the same... perhaps we could code better to avoid this...
And on those same jobs, we'll always have files that are unique to just the one customer.
Is there any option (even for pay) to get assistance setting this up properly from the Sourcegear staff?
As I mentioned, we have been doing this by hand before, and I do not want to start off on the wrong foot.
Nothing would be worse than finding out in 6 months that we did something to cause ourselves a bunch of extra work.
Re: Branch for Customer-Specific Version
Right, that's why you would only be sharing the portions that aren't different between different customers.In the sharing example, wouldn't we be always pushing out the changes because of the "shared" aspect?
The files that are unique to just the one customer would go in the customer folder. The items with only a few changes could be branched if those changes will ever be merged to something else, or just another copy added in.On some jobs, there will be a line or two of code that is different with the majority being the same... perhaps we could code better to avoid this...
And on those same jobs, we'll always have files that are unique to just the one customer.
Let's talk offline. Send an email to support at sourcegear.com with a link to this forum post
Beth Kieler
SourceGear Technical Support
SourceGear Technical Support