function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
waylonatcimwaylonatcim 

svn best practices

Hello,

 

just wanted to get a little info on how some of you might be using svn with your salesforce code.  I'm mainly interested in how you are storing the code in repositories.  Are you just keeping all of your apex code in a single repository, or breaking it up on a project by project basis?  

 

Thanks for any help!

shillyershillyer

Take a look at this article.

 

Hope that helps,

Sati

TehNrdTehNrd

Any chance we can get a guide covering the GUI version? I mean really......who wants to use a command line?

Ralph CallawayRalph Callaway

I'm a consultant, and have long term engagements with some clients and one-off projects for others.

 

For the one off I create a repository for the project and store everything I need to deploy, and nothing more. 

 

For longer clients, I've had one big repository for all projects.  This approach has worked well as long as I'm tackling projects in a sequential order, but tackling multiple projects at once has been more difficult, lots of merging.  Still figuring out the best approach here.

 

Some tips:

1) Add the following entires to your default svn ignore file

Referenced Packages - (Personally I've never used this folder before and it can get quite large and make checkouts slower)

.* - (Hides all eclipse project and settings file.  I've run into a situtation where I was migrating code from one sandbox to another and updating caused both projects to point to the same org which caused some pretty big headaches until I figured it out)

salesforce.schema - (No real value in adding this to svn)

2) Careful adding whole objects and whole workflows.  The files can be massive (40K+ lines of xml) and can be very tough to merge changes from production back into a sandbox.  This is particularly painful if a new feature comes in (say chatter tracking) and suddenly every line is different.

 

Admittedly I'm not an expert with this and most of this has just been trial and error and I'm sure there a lot better ways to do this.  Please share if you have some!