Mercurial Integration in the IDE
Go Up to Version Control Systems in the IDE
Contents
The Version Insight feature integrates support for the Mercurial version control system into the IDE.
For more information about Mercurial SCM, see http://mercurial.selenic.com/
Features of Mercurial in the IDE
For any file that is managed by Mercurial in the IDE:
- The History Manager displays both the local file history information and the Mercurial history information. For example, Mercurial comments and history are available on the Information tab of the History Manager.
- You can compare or diff versions of the file that were created in and are managed by a Mercurial system, even if the file was not created or backed up by the IDE.
- You can perform common Mercurial commands such as:
- Commit (Mercurial) (send your local changes to your local repository).
- Show Log (click the Information tab on the History Manager).
- Diff (compare two versions of a file).
Mercurial Command Equivalents in RAD Studio
If you are familiar with Mercurial, take a look at this useful table that describes how to perform common Mercurial tasks in the RAD Studio IDE.
Enabling Mercurial in RAD Studio
Mercurial support is not enabled by default. To enable Mercurial in the IDE, use the following steps:
- Download and install Mercurial in your system.
- In the IDE, go to Tools > Options > Version Control > Mercurial.
- Insert the path to the installed Mercurial executable (hg.exe) in your system. For instance, in a Windows system the Hg executable is located in:
C:\Program Files\Mercurial\hg.exe
- Change other parameters as you need.
- Click OK to close the wizard.
To implement the Mercurial features, the IDE does not add anything to your project. Instead, the IDE simply uses the Mercurial information that is stored in your local repository.
Mercurial Setup
Once you have installed Mercurial on your system, you need to set your user name and e-mail address. Mercurial uses this information in every commit.
To configure your user name and e-mail address of your Mercurial repository, you need to edit the Mercurial.ini file that is located in your system (C:\Users\<username>\Mercurial.ini
).
- Open the command line tool.
- Type the following command:
hg config --edit
- Add your username and email as detailed in the file:
# username = Jane Doe <jdoe@example.com>
username =
- Check your new settings by typing:
hg config
Update Your Local Repository
To avoid a conflict between versions, always do an update on your local files before you start making changes:
- Open the command line tool.
- Navigate to the local folder for your Mercurial repository.
- Type the following command:
hg pull
- Authenticate in the remote repository if needed.
- Update the local directory (the
pull
command does not update it automatically):hg update
Troubleshooting Using Mercurial
Cannot Retrieve Content from Your Remote Repository
If your remote Mercurial repository needs authentication (it is a private repository), you need to clone the data from the command line. See Clone a Copy of a Repository That Needs Authentication.
Topics
Equivalent commands
Repository Actions
- Cloning a Copy of a Mercurial Repository
- Adding a File to Version Control
- Committing Changes to Mercurial Version Control
Log and History Actions
- Viewing History and Revisions
- Viewing Version Control Comments
- Displaying the Version Control Log
- Using the Annotation Feature
Difference View Actions
- Diff'ing (Comparing) Versions of a File
- Adding a New Difference Viewer
- Installing an Alternate Difference Viewer
- Using an External Difference Viewer
Reverting Changes