Next: Working with global ChangeLog file, Previous: The VCS Menu, Up: Version Control System

### 12.4 The Version Control Contextual Menu

This section describes the version control contextual menu displayed when you right-click on an entity (e.g. a file, a directory, a project) from various parts of GPS, including the project view, the source editor and the VCS Explorer.

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.

Remove project
  Only displayed on a project line. This will remove the selected project from the VCS Explorer.
Expand all
  Expand all VCS Explorer project nodes.
Collapse all
  Collapse all VCS Explorer project nodes.
Clear View
  Clear the VCS Explorer.
Query status
  Query the status of the selected item. Brings up the VCS Explorer.
Update
  Update the currently selected item (file, directory or project).
Commit
  Submits the changes made to the file to the repository, and queries the status for the file once the change is made.

  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.

Open
  Open the currently selected file for writing. On some VCS systems, this is a necessary operation, and on other systems it is not.
View entire revision history
  Show the revision logs for all previous revisions of this file.
View specific revision history
  Show the revision logs for one previous revision of this file.
Compare against head revision
  Show a visual comparison between the local file and the most recent version of that file in the repository.
Compare against other revision
  Show a visual comparison between the local file and one specific version of that file in the repository.
Compare two revisions
  Show a visual comparison between two specific revisions of the file in the repository.
Compare base against head
  Show a visual comparison between the corresponding version of the file in the repository and the most recent version of that file.
Compare against tag/branch
  Only available on a Revision View and over a tag/branch. Show a visual comparison between the corresponding version of the file in the repository and the version of that file in the tag/branch.
Annotate
  Display the annotations for the file, i.e. the information for each line of the file showing the revision corresponding to that file, and additional information depending on the VCS system.

  When using CVS or Subversion, the annotations are clickable. Left-clicking on an annotation line will query and display the changelog associated to the specific revision for this line.

Remove Annotate
  Remove the annotations from the selected file.
Edit revision log
  Edit the current revision log for the selected file.
Edit global ChangeLog
  Edit the global ChangeLog entry for the selected file. see Working with global ChangeLog file.
Remove revision log
  Clear the current revision associated to the selected file.
Add
  Add a file to the repository, using the current revision log for this file. If no revision log exists, activating this menu will create one. The file is committed in the repository.
Add/No commit
  Add a file to the repository, using the current revision log for this file. If no revision log exists, activating this menu will create one. The file is not committed in the repository.
Remove
  Remove a file from the repository, using the current revision log for this file. If no revision log exists, activating this menu will create one. The modification is committed in the repository.
Remove/No commit
  Remove a file from the repository, using the current revision log for this file. If no revision log exists, activating this menu will create one. The modification is not committed in the repository.
Revert
  Revert a locale file to the repository revision, discarding all local changes.
Resolved
  Mark files' merge conflics as resolved. Some version control systems (like Subversion) will block any commit until this action is called.
Switch tag/bracnh
  Only available on a Revision View and over a tag/branch name. Will switch the tree starting from a selected root to this specific tag or branch.
Merge
  Only available on a Revision View and over a tag/branch name. Merge file changes made on this specific tag/branch.
View revision
  Only available on a Revision View and over a revision.
Commit as new Activity
  An action to prepare a group-commit in just one-click. This action will:
  - create an anonymous activity,
  - add all files selected into the VCS Explorer into the newly created anonymous activity,
  - open the activity log,

  Just fill the activity log and commit the anonymous activity.

Add to Activity
  A menu containing all the current activities. Selecting one will add the current file to this activity. This menu is present only if the file is not already part of an activity.
Remove from Activity
  Remove file from the given activity. This menu is present only if the file is already part of an activity.
Directory
  Only available when the current context contains directory information
  Add/No commit
    Add the selected directory into the VCS.
  Remove/No commit
    Remove the selected directory from the VCS.
  Commit
    Commit the selected directory into the VCS. This action is available only if the VCS supports commit on directories, see The VCS node.
  Add to Activity
    Add the selected directory into the VCS. This action is available only if the VCS supports commit on directories, see The VCS node.
  Query status for directory
    Query status for the files contained in the selected directory.
  Update directory
    Update the files in the selected directory.
  Query status for directory recursively
    Query status for the files in the selected directory and all subdirectories recursively. Links and hidden directories are not included.
  Update directory recursively
    Update the files in the selected directory and all subdirectories recursively. Links and hidden directories not included..
Project
  Only available when the current context contains project information
  List all files in project
    Bring up the VCS Explorer with all the source files contained in the project.
  Query status for project
    Query the status for all the source files contained in the project.
  Update project
    Update all the source files in the project.
  List all files in project and sub-projects
    Bring up the VCS Explorer with all the source files contained in the project and all imported sub-projects.
  Query status for project and sub-projects
    Query the status for all the source files contained in the project and all imported sub-projects.
  Update project and sub-projects
    Update all the source files in the project and all imported sub-projects.
Select files same status
  Select the files having the same status as the current selected file.
Filters
  Only available from the VCS Explorer. This menu controls filtering of the items displayed in the list.
  Show all status
    Do not filter out any file from the list in the VCS Explorer.
  Hide all status
    Filter out all the files from the list in the VCS Explorer.
  Show <status>
    When disabled, filter out the files with the given status from the VCS Explorer.