Next: Checking the state, Previous: Version-control support, Up: Version-control support [Contents][Index]

#### 10.8.1 How ECB identifies the VC-backend of a dir

ECB tries all functions added as identify-backend-funtions to the option `ecb-vc-supported-backends` until one of them returns not `nil` but a symbol which identifies the backend (e.g. `CVS`). After this check ECB stores the result of this check (i.e. either the identified backend or the fact that the directory is not managed by a VC-system) for that directory in a special cache, so the identify-backend-process will be performed only once per directory. If for a directory a VC-backend could be identified ECB stores not only the backend itself for that directory but also the associated check-state-function defined in `ecb-vc-supported-backends` (see Checking the state).

You can add arbitrary functions to this options as long as they get one directory-argument and return either nil or a backend-symbol. Per default ECB offers the following functions to identify the VC-backend CVS, RCS, SCCS, Git, Monotone or Subversion37:

`ecb-vc-dir-managed-by-CVS DIRECTORY`

  Return `CVS` if DIRECTORY is managed by CVS. nil if not.

`ecb-vc-dir-managed-by-RCS DIRECTORY`

  Return `RCS` if DIRECTORY is managed by RCS. nil if not.

`ecb-vc-dir-managed-by-SCCS DIRECTORY`

  Return `SCCS` if DIRECTORY is managed by SCCS. nil if not.

`ecb-vc-dir-managed-by-MTN DIRECTORY`

  return `MTN` if directory is managed by Monotone. nil if not.

`ecb-vc-dir-managed-by-BZR DIRECTORY`

  return `BZR` if directory is managed by Bazaar. nil if not.

`ecb-vc-dir-managed-by-GIT DIRECTORY`

  Return `GIT` if directory is managed by Git. nil if not. Because with Git only the top-most directory of a source-tree has a subdir .git this function tries recursively upwards if there is a .git-subdir.

`ecb-vc-dir-managed-by-SVN DIRECTORY`

  Return `SVN` if DIRECTORY is managed by Subversion. nil if not. Returns always nil if the library vc-svn.el can not be found.

If ECB should support another VC-backend than CVS, RCS, SCCS, Monotone, Git or Subversion you have to write your own identify-backend-funtion for the used VC-backend (e.g. Clearcase)!

#### Footnotes

### (37)

For this the most recent version of the VC-package (incl. the libraries vc-git.el, vc-mono.el and vc-svn.el) is needed - as contained in Emacs >= 22 and XEmacs >= 21.4.22

Next: Checking the state, Previous: Version-control support, Up: Version-control support [Contents][Index]