Node:ecb-version-control, Previous:ecb-mode-line, Up:Customizable options



Group ecb-version-control

This group contains settings for the version-control-support of ECB:

vc-directory-exclude-regexps User Option
Which directories should be excluded from VC-state-check. If a directory matches any of the regexps of this option the VC-state of its sources will not be checked - This option takes only effect if ecb-vc-enable-support is not nil.

vc-enable-support User Option
Enable support for version-control (VC) systems. If on then in the directories-buffer (if the value of the option ecb-show-sources-in-directories-buffer is on for current layout), the sources-buffer and the history-buffer all file-items are displayed with an appropriate icon in front of the item-name to indicate the VC-state of this item. If off then no version-control-state checking is done.

Because this check can be take some time if files are managed by a not local Version-control-server ECB performs this check stealthy (see ecb-stealthy-tasks-delay) so normally there should no performance-decrease or additional waiting-time for the user. But to get sure this option offers three choices: t, unless-remote and nil. See the option ecb-prescan-directories-for-emptyness for an explanation for these three choices.

The option ecb-vc-directory-exclude-regexps offers are more fine granularity to exclude the sources of certain directories from the VC-state-check.

See ecb-vc-supported-backends and ecb-vc-state-mapping how to customize the VC-support itself.

vc-state-mapping User Option
Mapping between VC-states from the backends and ECB-known VC-states. ECB understands the following state-values:
up-to-date
The working file is unmodified with respect to the latest version on the current branch, and not locked.
edited
The working file has been edited by the user. If locking is used for the file, this state means that the current version is locked by the calling user.
needs-patch
The file has not been edited by the user, but there is a more recent version on the current branch stored in the master file.
needs-merge
The file has been edited by the user, and there is also a more recent version on the current branch stored in the master file. This state can only occur if locking is not used for the file.
added
The working file has already been added/registered to the VC-system but not yet commited.
unlocked-changes
The current version of the working file is not locked, but the working file has been changed with respect to that version. This state can only occur for files with locking; it represents an erroneous condition that should be resolved by the user.
ignored
The version-control-system ignores this file (e.g. because included in a .cvsignore-file in case of CVS).
unknown
The state of the file can not be retrieved; probably the file is not under a version-control-system.

All state-values a check-vc-state-function of ecb-vc-supported-backends can return must have a mapping to one of the ECB-state-values listed above. If for a certain backend-VC-state no mapping can be found then per default 'edited is assumed!

The default value of this option maps already the possible returned state-values of vc-state and vc-recompute-state (both GNU Emacs) and vc-cvs-status (Xemacs) to the ECB-VC-state-values.

vc-supported-backends User Option
Define how to to identify the VC-backend and how to check the state. The value of this option is a list containing cons-cells where the car is a function which is called to identify the VC-backend for a DIRECTORY and the cdr is a function which is called to check the VC-state of the FILEs contained in DIRECTORY.

Identify-backend-function: It gets a full directory-name as argument - always without ending slash (rsp. backslash for native Windows-XEmacs) - and has to return a unique symbol for the VC-backend which manages that directory (e.g. 'CVS for the CVS-system or 'RCS for the RCS-system) or nil if the file is not managed by a version-control-system.

Check-vc-state-function: It gets a full filename (ie. incl. the complete directory-part) and has to return a symbol which indicates the VC-state of that file. The possible returned values of such a check-vc-state-function have to be mapped with ecb-vc-state-mapping to the allowed ECB-VC-state values.

ECB runs for a certain DIRECTORY all identify-backend-functions in that order they are listed in this option. For the first which returns a value unequal nil the associated check-state-function is used to retrieve the VC-state of all sourcefiles in that DIRECTORY.

There is no need for the identify-backend-function or the check-vc-state-function to cache any state because ECB automatically caches internally all necessary informations for directories and files for best possible performance.

To prepend ECB from checking the VC-state for any file set ecb-vc-enable-support to nil.

Default value for GNU Emacs: Support for CVS, RCS, SCCS and Subversion (for the later one the most recent version of the VC-package incl. the vc-svn library is needed) is added per default. To identify the VC-backend the functions ecb-vc-managed-by-CVS, ecb-vc-managed-by-RCS rsp. ecb-vc-managed-by-SCCS rsp. ecb-vc-managed-by-SVN are used. For all three backends the function ecb-vc-state of the VC-package is used.

Default value for XEmacs: XEmacs contains only a quite outdated VC-package, especially there is no backend-independent check-vc-state-function available (like vc-state for GNU Emacs). Only for CVS a check-vc-state-function is available: vc-cvs-status. Therefore ECB adds per default only support for CVS and uses ecb-vc-managed-by-CVS rsp. vc-cvs-status.

Example for GNU Emacs: If vc-recompute-state (to get real state-values not only heuristic ones) should be used to check the state for CVS-managed files and vc-state for all other backends then an element (ecb-vc-dir-managed-by-CVS . vc-recompute-state) should be added at the beginning of this option.

vc-xemacs-exclude-remote-cvs-repository User Option
Exclude directories with a remote cvs-repository from VC-check. This option takes only effect for XEmacs and is needed cause of the outdated VC-package of XEmacs which offers no heuristic state-checking and also no option vc-cvs-stay-local. So this option takes only effect if vc-cvs-stay-local is not avaiable. In this case ECB treats directories which are managed by CVS but have a remote repository as if the directory would be not managed by CVS (so the files are not checked for their VC-state). This si done to avoid blocking XEmacs when running full cvs-commands (e.g. "cvs status") over the net.

Note: When ECB can find the option vc-cvs-stay-local then this option will automatically take no effect regardless which Emacs-version is used.