[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
12.1 The VCS Explorer 12.2 The VCS Menu 12.3 The Version Control Contextual Menu 12.4 Working with global ChangeLog file
GPS offers the possibility for multiple developers to work on the same project,
through the integration of version control systems (VCS). Each project can be
associated to a VCS, through the VCS
tab in the Project property
editor. See section 7.7 The Project Properties Editor.
GPS does not come with any version control system: it will use an underlying command-line system such as CVS or ClearCase to perform the low level operations, and provides a high level user iterface on top of them. Be sure to have a properly installed version control system before enabling it under GPS.
The systems that are supported out of the box in GPS are CVS and ClearCase. There are two interfaces to ClearCase: the standard ClearCase interface, which is built-in and uses a generic GPS terminology for VCS operations, and the Native ClearCase interface, which is fully customizable and uses by default the terminology specific to ClearCase.
Note that, at the moment, only Snapshot Views are supported in the ClearCase integration; Dynamic Views are not supported.
It is also possible to add your own support for other version control systems, or modify the existing CVS and ClearCase interfaces, see 15.8 Adding support for new Version Control Systems for more information.
When using CVS, GPS will also need a corresponding patch
command
that usually comes with it. If you are under Windows, be sure to install
a set of CVS and patch executables that are compatible.
It is recommended that you first get familiar with the version control system that you intend to use in GPS first, since many concepts used in GPS assume basic knowledge of the underlying system.
Associating a VCS to a project enables the use of basic VCS features on the source files contained in the project. Those basic features typically include the checking in and out of files, the querying of file status, file revision history, comparison between various revisions, and so on.
Administration of VCS systems is not handled by GPS at this stage. Therefore, before working on a project using version control system, make sure that the system is properly set-up before launching GPS.
Note: the set-up must make sure that the VCS commands can be launched without entering a password.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
The VCS Explorer provides an overview of source files and their status.
The easiest way to bring up the VCS Explorer is through the menu
VCS->Explorer
. The Explorer can also be brought up using the
contextual menu Version Control->Query status
on files,
directories and projects in the file and project views, and on file
editors. See section 12.3 The Version Control Contextual Menu.
The VCS Explorer contains the following columns:
Unknown
Not registered
Up-to-date
Added
Removed
Modified
Needs merge
Needs update
Contains merge conflicts
The VCS Explorer supports multiple selections. To select a single line, simply left-click on it. To select a range of lines, select the first line in the range, then hold down the Shift key and select the last line in the range. To add or remove single columns from the selection, hold down the Control key and left-click on the columns that you want to select/unselect.
The explorer also provides an interactive search capability allowing you to quickly look for a given file name. The default key to start an interactive search is Ctrl-i. See Interactive Search for more details.
The VCS contextual menu can be brought up from the VCS explorer by left-clicking on a selection or on a single line. See section 12.3 The Version Control Contextual Menu.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Basic VCS operations can be accessed through the VCS menu. Most of these functions act on the current selection, i.e. on the selected items in the VCS Explorer if it is present, or on the currently selected file editor, or on the currently selected item in the Project/File View. In most cases, the VCS contextual menu offers more control on VCS operations. See section 12.3 The Version Control Contextual Menu.
For a description of the other entries in the VCS menu, see 12.3 The Version Control Contextual Menu
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
Depending on the context, some of the items described in this section won't be shown, which means that they are not relevant to the current context.
It is possible to tell GPS to check the file before the actual commit
happens. This is done by specifying a File checker
in the
VCS
tab of the project properties dialog. This File
checker
is in fact a script or executable that takes an absolute file
name as argument, and displays any error message on the standard
output. The VCS commit operation will actually occur only if nothing
was written on the standard output.
It is also possible to check the change-log of a file before commit, by
specifying a Log checker
in the project properties dialog. This
works on change-log files in the same way as the File checker
works on
source files.
When using CVS, the annotations are clickable. Left-clicking on an annotation line will query and display the changelog associated to the specific revision for this line.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
A global ChangeLog file contains revision logs for all files in a directory and is named `ChangeLog'. The format for such a file is:
ISO-DATE name <e-mail> <HT>* filename[, filename]: <HT>revision history |
where:
The name and <e-mail> items can be entered automatically by setting the GPS_CHANGELOG_USER environment variable. Note that there is two spaces between the name and the <e-mail>.
On sh shell: export GPS_CHANGELOG_USER="John Doe |
Using the menu entry Edit global ChangeLog will open the file `ChangeLog' in the directory where the current selected file is and create the corresponding `ChangeLog' entry. This means that the ISO date and filename headers will be created if not yet present. You will have to enter your name and e-mail address.
This `ChangeLog' file serve as a repository for revision logs, when ready to check-in a file use the standard Edit revision log menu command. This will open the standard revision log buffer with the content filled from the global `ChangeLog' file.
[ << ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |