Next: , Previous: Tag Hierarchy Methods, Up: Customizing

6.3 Version Control

When using the file mode in speedbar, information regarding a version control system adds small details to the display. If a file is in a version control system, and is “checked out” or “locked” locally, an asterisk ‘*’ appears at the end of the file name. In addition, the directory name for Version Control systems are left out of the speedbar display.

You can easily add new version control systems into speedbar's detection scheme. To make a directory “disappear” from the list, use the variable speedbar-directory-unshown-regexp.

Next, you need to write entries for two hooks. The first is speedbar-vc-path-enable-hook which will enable a VC check in the current directory for the group of files being checked. Your hook function should take one parameter (the directory to check) and return t if your VC method is in control here.

The second function is speedbar-vc-in-control-hook. This hook takes two parameters, the path of the file to check, and the file name. Return t if you want to have the asterisk placed near this file.

Lastly, you can change the VC indicator using the variable speedbar-vc-indicator, and specify a single character string.