<type>documentation</type>
<domain>versioncontrol</domain>
<id>setup</id>
<title>Setting Up Version Control in Wing</title>
<date>$Date: 2006-05-24 22:53:07 -0400 (Wed, 24 May 2006) $</date>
<version>$Revision: 13098 $</version>
<product>pro+</product>

Wing relies on being able to run the command line executable, such as ``hg``, ``git``, or
``p4`` for each version control system.  These must be installed first, if you don't
already have them.

You will also need to check out a repository, or add your files to a new repository,
according to the instructions for the VCS that you are using. This must be done outside of
Wing, since the version control integration is not designed to create repositories or 
initially check out files from a VCS.

Wing assumes you are using an external SSH key manager to authenticate version control
operations, or that the version control commands are configured to display an 
authentication dialog. Wing does not store passwords, nor does it provide a way to enter
them for each operation. Refer to the documentation for each version control system to set
up the appropriate authentication method. If you've never set up SSH before, see also `SSH
Setup Details <ref:proj/ssh-setup-details>`__.

**Activating Version Control in Wing**

Once you have your files added to version control, you can set them up in Wing simply by
adding directories and files to your Wing project, using the items in the ``Project``
menu. The relevant version control menus should appear in the menu bar.

Which VCSs will be considered for projects can be controlled in the `Version Control
<script:show_preferences_gui#prefname="versioncontrol.enable-non-script">`__ preferences
group, with the ``Active`` preference under each version control system's preferences page.
This supports entirely disabling a version control system, enabling it only if used in the
project, or setting it as always active, so its menu and tool will always be available.

**Trouble-Shooting**

To diagnose problems with the version control integration, enable ``Show Console``
in the VCS tool's ``Options`` menu.  This adds a tab to the tool that displays
the commands that are executed and their output.

In some cases you may need to point Wing to the executable for your VCS using the
``Executable`` preference on the VCS's page, under the `Version Control
<script:show_preferences_gui#prefname="versioncontrol.enable-non-script">`__ preferences
area. This should be set to the full path to the command line executable and **not** the
executable for GUIs like ``TortoiseHg``.