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:
Keep in mind that the setup steps are only required once—you can reap the benefits from version control forever!
Your first step is to install Subversion in your environment.
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.
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
![]() |
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. | |
5. | Click Finish to begin the installation, and then Install All when prompted. You will be required to restart Eclipse once the installation completes. |
3.144.222.193