,

Team development with a Revision Control System

Now that you have gone through a simple case of conflict resolution, you can move to the next step of using a revision control system. Selecting a revision control system and organizing your repository in the Force.com IDE to meet the specific versioning needs of your project are beyond the scope of this book. For the examples that follow, you will use Subversion with the Subclipse plug-in and a very simple repository structure to demonstrate some common versioning use cases.

In real life, your revision control system will no doubt run on a server located in a server room or data center, and shared between your project staff. For this example, however, you will create and use a Subversion repository on a local machine.

In order to understand the use of a version control system, you will have to perform the following high-level steps:

  • Install subversion to your desktop

  • Create a repository

  • Install the Subclipse plug-in into the Force.com IDE

  • Configure Subclipse to see the repository you created

  • Save your development project into the repository

  • Make some changes and save them to your development organization

  • Pretend to be a second developer, create a new IDE project from the repository

  • Make and commit some changes to the repository as that second developer

  • Merge those changes back to the initial project and organization

Keep in mind that the setup steps are only required once—you can reap the benefits from version control forever!

Install subversion

Your first step is to install Subversion in your environment.

1.
Go to the site http://subversion.tigris.org/getting.html, and select the CollabNet binary.

2.
At the CollabNet site, download the CollabNet Subversion Server and Client. You will have to register on the site to receive the download.

Note

The example in the remainder of this chapter was done with Subversion 1.2.4 for Windows and version 1.2.4 of the Subclipse plug-in for Eclipse. The most current versions of these two components may or may not fully cooperate with the steps in this example. You can generally download previous versions of both Subversion and the Subclipse plug-in from their respective sites.

3.
Install Subversion, using all the defaults.

Create a Repository

With Subversion installed, you can now create a repository for your code.

1.
Open a command prompt and enter the following code:

C:>svnadmin create c:svn_repos

2.
In the same command prompt, change the directory to c:svn_reposconf, the conf directory under the directory you created for the repository.

3.
Use Notepad, or some other editing tool, open the passwd file in the conf directory and add a user name and password to the file.

4.
Save the passwd file and exit the command prompt.

In this example, you will access the repository in a special local mode through Subclipse, so you do not need to worry about configuring the svnserve daemon or apache to act as a subversion server. If you are allowing others to access this repository, though, you have to configure one or other of these services. Please refer to the Subversion site you originally accessed for more information on this task.

Installing the Subclipse Plug-in

The Subclipse plug-in links the Eclipse environment to your new repository.

1.
Go to http://subclipse.tigris.org to get the latest Eclipse Update Site URL compatible with your version of Eclipse.

2.
In the Force.com IDE, navigate to Help Software Updates, and select the Available Software tab. Click Add Site, and enter the URL from the previous step.

3.
Select the new site and click Finish to fetch the latest version of the Subclipse plug-in. Select the required Subclipse plug-in from the list returned from the site.

4.
Click Next, accept the terms, and click Next again.

5.
Click Finish to begin the installation, and then Install All when prompted. You will be required to restart Eclipse once the installation completes.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.142.171.64