Next: , Previous: Describing a VCS, Up: Adding support for new Version Control Systems


16.9.3 Implementing VCS actions

A number of “standard” VCS operations are known to GPS. Each of these operations can be implemented, using Actions. See Defining Actions) for a complete description of how to implement actions.

Here is a list of all the defined VCS operations, and their parameters:

status_files
$1 = whether the log files should be cleared when obtaining up-to-date status
$2- = the list of files to query status for.
Query the status for a list of files. This should perform a complete VCS query and return results as complete as possible.
status_dir
$1 = the directory.
Same as above, but works on all the files in one directory.
status_dir_recursive
$1 = the directory.
Same as above, but works on all the files in one directory and all subdirectories, recursively.
local_status_files
$* = list of files
Query the local status for specified files. This query should be as fast as possible, not connecting to any remote VCS. The results need not be complete, but it is not useful to implement this command if the output does not contain at least the working revision.
open
$* = list of files
Open files or directories for editing. This command should be implemented on any VCS that require an explicit check-out/open/edit action before being able to edit a file.
update
$* = list of files
Bring the specified files in sync with the latest repository revision.
resolved
$* = list of files
Mark files' merge conflics as resolved. Some version control systems (like Subversion) will block any commit until this action is called.
commit
$1 = log file
$2- = list of files
Commit/submit/check-in files or directories with provided log. The log is passed in a file.
commit_dir
$1 = log
$2 = directory
Commit/submit one directory with provided log. The log is passed in a file.
history_text
$1 = file
Query the entire changelog history for the specified file. The result is expected to be placed into an editor as plain text.
history
$1 = file
Query the entire changelog history for the specified file. The result is expected to be placed into a Revision View.
history_revision
$1 = revision
$2 = file
Query the history for corresponding revision of the specified file.
annotate
$1 = file
Query the annotations for a file.
add
$1 = log
$2- = list of files or dirs
Add files/dirs to the repository, with the provided revision log. The added files/dirs are commited.
add_no_commit
$1 = log
$2- = list of files or dirs
Add files/dirs to the repository, with the provided revision log. The added files/dirs are not commited.
remove
$1 = log
$2 = file or dir
Remove file/dir from the repository, with the provided revision log.
remove_no_commit
$1 = log
$2 = file or dir
Remove file/dir from the repository, with the provided revision log. The removed files/dirs are not commited.
revert
$* = files
Revert the local file to repository revision, cancelling all local changes, and close the file for editing if it was open.
diff_patch
$1 = file
Create a textual diff for the given file. This command is used to build the activity patch file.
diff_head
$1 = file
Display a visual comparison between the local file and the latest repository revision. The diff command must report a normal diff as opposed to context or unified ones.
diff_base_head
$1 = file
Display a visual comparison between the revision from which the file has been checked-out and the latest revision. The diff command must report a normal diff as opposed to context or unified ones.
diff_working
$1 = file
Display a visual comparison between the local file and the revision from which it was obtained. The diff command must report a normal diff as opposed to context or unified ones.
diff
$1 = rev
$2 = file
Display a visual comparison between the local file and the specified revision. The diff command must report a normal diff as opposed to context or unified ones.
diff2
$1 = revision 1
$2 = revision 2
$3 = file
Display a visual comparison between the two specified revisions of the file. The diff command must report a normal diff as opposed to context or unified ones.